Firebase vs AWS: Which is right for your app project in 2020?

Firebase vs AWS

Introduction

Google Firebase vs AWS, which is right for your app project?  This is a critical decision that may mean the difference between your project succeeding or failing.

When discussing app projects, most people focus on the front end technologies.  However, an equally important question is which back end platform should power your app?  Choosing the right back end platform can significantly improve the success of your app project.  

This article will compare Google Firebase vs AWS from the perspective of an app  development project.  We will compare the each platform against requirements that are critical to an app development project.  

Requirements such as authentication, database management, serverless functions, push notification and cloud storage will be assessed.  For each requirement, we will rate each platform with a number from 1 to 5 with 5 being the highest rating.

In conclusion, we will make a recommendation on the right platform for an app development project.

Before we start the comparison, it is worth covering some overall concepts and a background of each platform.

 

What is a Backend-as-a-service?

Backend-as-a-service (BaaS) platforms provide common server side functionality that allows app developers to focus on the front end development.  Functionality such as authentication, database management, serverless functions, push notification and cloud storage are provided by BaaS vendors. 

Choosing the right BaaS platform can significantly reduce your development time, cost and improve the quality of your app.  

Google Firebase Logo

Overview of Google Firebase

The objective of Google Firebase is to ‘help mobile and web app teams succeed.’  They have a strong focus on app development teams.

Their services are built around three areas:

  • Building better apps
  • Improving app quality
  • Growing your business
Firebase was founded 2011 and acquired by Google in 2014.  Since its acquisition from Google, usage has grown with the platform being used by 1.5 million apps
AWS Logo

Overview of Amazon Web Services (AWS)

AWS provides over 175 services in its cloud computing platform.  We are using the generic term cloud computing’ because it provides a broad range of services including infrastructure as a service (IaaS) and platform as a service (PaaS) offering.

As shown in the graph below, AWS holds a leading 33% market share in a $100 billion cloud market. 

Source: Statistica

What is AWS Amplify?

AWS Amplify is a service offering that targets mobile and web app projects.  It is a set of tools, libraries and software development kits (SDKs) that help to integrate AWS services into your app.  

Amplify also provides a command line interface that helps to provision AWS services for your app. 

Now we have an overview of each platform, we evaluate their service offerings for an app development project. 

Firebase vs AWS: A direct comparison

This section will compare Firebase vs AWS on key performance dimensions.  Effectiveness on a particular dimension will be ranked from 1 being low to 5 being high.  

For the sake of brevity, we are only covering the dimensions that are important in mobile and web app development.

Firebase vs AWS: Authentication comparison

User Authentication

Authentication is a common requirement for most apps.  You need to authenticate users and ensure only authorised users have access to data and functionality.

Multiple login methods

Firebase has extensive authentication options. From the standard user name and password to third party authentication from platforms including Google, Facebook, Apple, Twitter Microsoft and GitHub.

There is even the option to authenticate via SMS or an email link. Both of these options help confirm the contact details provided by the user.

You can even allow your users to login under any of the options above and they will be associated with a Firebase account. For example: In one instance, the user can login with their Facebook account. The next time they can login with their Twitter account. Both logins will be associated with one Firebase account where you can control their access privileges.

  • Up to 10k SMS Authentications per month -> FREE.

  • All other authentications -> FREE with no restrictions. 

The AWS Cognito service also allows you to use social platforms such as Facebook, Google, Amazon or Apple. 

Congito can also verify phone numbers and email addresses automatically by sending verification codes.

Once the user receives the verification code, they are successfully authenticated.

  • Up to 50k monthly active users -> FREE.

  • 50,001-100,000 -> $0.0055 per Monthly Active User.
Firebase Score = 5
AWS Score = 3

Simplicity and pricing are strong factors when evaluating authentication services.

We found Firebase Authentication extremely easy to use.  In addition, if you exclude SMS authentication, the service is free on all usage levels.

Firebase vs AWS: Database comparison

Most apps will require the ability to store and retrieve data in the cloud using a database service.  Your app may also need to synchronise data between different users and devices.

Firebase has two database services called Cloud Firestore and Firebase Realtime Database.  Both are NoSQL databases however there are specific applications for each database.

In both database services, the app can use a SDK to interact with the database. This means that we do not need to interact with an application server tier. This makes it extremely easy to get your app up and running quickly.

Both databases also allow real time synchronisation across from multiple devices. 

Some key reasons why you would choose one service over another that is summarised below.

App RequirementRealtime DBFirestore
Synchronise small amount of data that changes frequentlyYesNo
Large volume of data with advanced querying, sorting and transactionsNoYes
Only simple JSON structure is requiredYesNo
Documents stored in collectionsNoYes
App Scalability200k concurrent users
1k writes per second
1 million concurrent users
10k writes per second
  • Up to 100 simultaneous connections

  • 1 GB Storage

  • 10 GB Download 
  • 1 Gib Storage 

  • 10 GiB/month Network Egress 

  • 20k/day Document Write 

  • 50k/day Document Reads 

  • 20k/day Document Deletes

AWS provides a multitude of database services from the NoSQL Amazon DynamoDB to the relational Amazon Aurora Serverless database. Both of these database servers are on demand services that self manage and automatically scale.

In addition, AWS also offers ‘instance based’ database services that host a wide variety of database types.

If you have a strong desire for your app to use a relational database, then AWS is a clear winner.

For this article, we will compare the Amazon DynamoDB NoSQL database with the Google Firestore service which is also a NoSQL database.

DynamoDB can be accessed through the GraphQL API interface

Before you can access the database, you need to create a schema mapping. This tells the code how the database queries should resolve in the DynamoDB database.

Further information on the how this can be done can be found here

AWS also offers the ability to automatically synchronise data on the local device and remote storage. Like Firestore, this allows the ability to work offline and then automatically synchronise the data when the connection is back.

This can be done through AWS AppSync

  • 25 GB of data storage

  • 2.5 million read requests per month

  • 1 GB of data transfer out

Score for Database Service

Firebase Score = 3
AWS Score = 5

Whatever your database requirement, AWS has a service that will satisfy them.  From a variety of database types to a self managed instance or a managed instance, AWS can meet your requirement.

Also, if you have a preference for a relational database, then only AWS can provide these options.

The pricing of the free tier by Amazon DynamoDB is also more favourable than Firestore.

In this particular dimension, we believe AWS is a clear winner.

Firebase vs AWS: Serverless function comparison

Serverless functions

Regardless of the type of app that you are developing, you will probably need to have server side functionality.

This can come in various forms such as complex business logic or simple post processing of user generated content such as photos and videos.

Prior to serverless functions, we would have a server side logic hosted in either cloud based servers such as Amazon EC2 or physical hardware.

Managing this infrastructure required significant effort that detracts from delivering value to your customers.

Now we can deploy our code into ‘serverless functions’ that are self managed.  They can automatically scale to meet the load requirements.

This allows us to focus on developing functionality rather than maintaining infrastructure.

Firebase supports server side code through ‘Cloud Functions’ that are self managed serverless functions.

They can only be developed in Javascript or Typescript within a Node.js version 10 environment.

After developing and testing your function, you can ‘push’ the function to the live environment with a command line interface.

Cloud functions can be invoked using a Firestore triggers from various Firebase services such as the Firestore. This is useful in situations where you would like a cloud function to be invoked based on a certain event (e.g. when a new Firebase account is created you would like to send a welcome email).

They can also be triggered from your client app using the Firebase SDK or by your app invoking a HTTP endpoint published by the Cloud Function.

  • 2 million invocations per month

  • 400k of GB seconds and 200k GHz per month of compute time

  • 5 GB outbound Internet traffic per month

Note: Even for this free tier, you need to have an active billing account.

Usage above the free tier above will be automatically charged to the active billing account.

Serverless functions in AWS are called ‘AWS Lambda functions’. They allow you to develop server side functionality without having to worry about managing infrastructure. They will also autoscale to meet your load requirements.

One of the key benefits over Google Cloud functions is its support for many programming languages.  

Lambda Functions natively support Java, Go, PowerShell, Node.js, C#, Python, and Ruby.

There is also a runtime API that provides support for additional languages.  Language support for Lambda functions cannot be matched by Firebase.

Your functions can also be triggered from other AWS services such as a trigger from DynamoDB or AWS S3 file storage.  This allows data to be transformed as it progresses through the AWS infrastructure.

In order for your app to invoke the Lambda functions, you need to deploy the Amazon API Gateway.  You then configure your gateway to invoke the Lambda function.

Here is the architecture of the AWS solution:

Source:  AWS

The steps that need to be followed to set up the API Gateway with the Lambda function are in this tutorial.

  • 1 million API calls within first 12 months -> FREE

  • After 12 months or if you exceed the one million API calls within the first 12 months ->

    $1.29 per million calls up to 300 million calls
  • 1 million requests and 400k GB seconds of compute time per month -> FREE

Score for Serverless Functions

Firebase Score = 5
AWS Score = 4

Firebase only supports Node.js v10. If you wish to use a different language other than Javascript, then AWS will be the clear choice.

However, for a start-up we assume that there are no restrictions on which language you should use.

Given the simplicity of using Firebase, if you are comfortable with Node.js we recommend Firebase.  As a startup, you need to get your minimum viable product (MVP) operational as soon as possible.

Firebase vs AWS: Push Notification Comparison

Push Notification

A significant benefit of building an app is the ability to engage your users through push notifications. The average click through rate for email is only 3% when compared with the engagement rate for push notifications is 21%.

This makes sense when most emails are buried deep into an inbox or in the spam folder. Whereas push notifications are more prominant on the device and can have clear calls to action for your user.

Push notifications are critical for marketing and re-engaging your users.

Google Firebase provides notifications when the user are in the app through Firebase in-app messaging.  

There is also Firebase Cloud Messaging (FCM) that caters for messages where the user is not in app.

  • In App Messaging -> Free for all volume

  • Cloud Messaging -> Free for all volume

AWS has two services that can send push notifications.

The first is the Amazon Pinpoint that is leveraged by the AWS Amplify library.  

AWS Pinpoint is a wholistic communication platform that incorporates various communication modes such as email, SMS, voice as well as push notifications. If advanced segmentation, personalisation and multichannel marketing is a requirement, then AWS Pinpoint is a good solution.

The architecture of AWS Pinpoint solution is illustrated below:

Source: Amazon

Another AWS messaging service is the Simple Notification Service.  As shown in the architecture diagram below, publishers can send messages on a topic to a number of subscribers.

AWS Simple Notification Service

Source: Amazon

Although not specifically shown in the diagram above, SNS can also send messages through the mobile push notification service.  Instruction on how to set it up are here

  • First 1 million push messages per month -> FREE.

    After the first 1 million messages -> $0.000001 for each push notification message.
  • First 1 million messages per month -> FREE

  • After that -> $0.50 per million messages.

Score for Push Notifications

Firebase Score = 5
AWS Score = 3

If you require a comprehensive communications platform with advanced segmentation and multichannel marketing, then AWS Pinpoint is a clear winner.

However, this article is assessing the solution from a start-up perspective. 

For a startup, Firebase Messaging is extremely easy to use. The ‘always free’ pricing model is also appealing even though AWS also has a generous free tier.

For the startup requirement, we believe Firebase is a better solution.

Firebase vs AWS: Cloud Storage

Cloud Storage

Most successful apps need to store files on the cloud.  This could be in the form of user generated content that needs to be shared such as pictures or videos.

It’s important to note that this is not the same as a database service.

Firebase Cloud Storage has these features:

  • Robust operations ensures uploads and downloads are resilient in fluctuating connections.
  • Integration with Firebase Authentication ensuring only authorised users can access files.
  • Infrastructure that provides exabyte scalability that powers Google Photos and Spotify. 

As with most Firebase services, you can leverage them easily using Firebase SDK for the different mobile platforms.

FREE Tier:

  • 5 GB storage

  • 1 GB downloads per day

  • 20k upload operations per day

  • 50k download operations per day

Over FREE Tier:

  • Storage: $0.026/GB per month

  • Downloads: $0.12/GB

  • Upload operations: $0.05 for 10k operations

  • Download operations: $0.004 for 10k operations

AWS has an enterprise standard storage platform called S3.

Files are stored in non-hierarchical structures known as ‘buckets’. Each file stored can append up to 10 key-value pairs to describe that file. These values can also be maintained throughout the life of the stored object. Inventory reports are available that helps to keep track of the files stored in S3.

Versioning also allows rollback of objects in case of accidental deletion or modification. Accidental deletions can also be minimised by mutlifactor authentication delete. This requires multiple forms of authentication when you try and delete an object.

Replication is available in the same and different AWS zones. This improves latency and disaster recovery for your stored data.

AWS also has advanced monitoring and control of S3. This ensures you track not only how your resources are being used, but control the billing of your AWS accounts as well.

Costs can further be controlled by having different storage classes. More frequently accessed data can be stored in ‘S3 Standard’ with less frequently accessed data stored in lower cost storage tiers.

Security and access management features are excellent. Security can be managed using AWS Identity and Access Management (IAM). Finely grained security can be controlled with access control lists (ACLs) and bucket policies.

Security monitoring tools such as ‘Access Analyzer for S3’ allow you to monitor your security policies and remediate issues before they become a breach.

Advanced query in place allows you to run SQL like queries while in S3 storage. It also integrates with Amazon Athena that allows complex querying functionality without the need to export the data into a separate platform.

Another strength of AWS S3 is it’s data transfer capabilities. You are able to extend an existing on premise data storage hardware with AWS Storage Gateway. There is even the ability to transfer data offline using a portable physical device.

The features offered by Amazon S3 are too many to be covered in this article. Needless to say, it is a ‘gold standard’ offering.

  • Storage costs for first 50 TB / Month: $0.025 per GB

Score for Cloud Storage

Firebase Score = 4
AWS Score = 5

The ‘gold standard’ of data storage is AWS for S3. The features it provides along with the integration with other AWS services means that it meets almost all requirements for established businesses.

In this dimension, AWS clearly offers more features and benefits. If some of these features are important to your start-up, then S3 would be a good option.

Firebase vs AWS - Final comparison

Which platform scores higher?

The total score against the criteria for a back end for a startup app development project is:

Firebase Score = 22
AWS Score = 20

The scores are very close. 

We found that Firebase allowed use to get minimum viable products (MVP) operational very quickly when compared with AWS.

Even graduate programmers in our team were able to get MVPs operational very quickly on Firebase.  This was coming from limited experience with the platform and relying on self directed learning.

We found AWS slightly more difficult to establish.  Complexity was reduced with Amplify.  However, there were still many ‘moving parts’ that required more training.

Conclusion

This post performed a direct comparison of Google Firebase vs AWS.  It focused on the requirements for an mobile or web app development project in a start up environment.

It did not consider the requirements for larger organisations that have legacy infrastructure and systems.

For an app development project in a start up environment, we recommend Google Firebase.

However, the scores did not vary significantly.  If there are specific features in AWS are important for your project, then choose AWS.  

For example, you may have a strong requirement to use a relational database.  Or you may want to code serverless functions in a language other than Javascript or Type script.  

If this is the case for your project, then you should use AWS.

Do you have any questions?  Please comment below and we would be happy to answer your questions.

Leave a Reply