Supabase is an open source Firebase alternative that provides all the backend features needed to build a digital product. Over the last four years AWS Amplify has been our main backend solution. We recently started using Supabase, and in this article we look at how Supabase compares to AWS Amplify.
Supabase is built on top of Postgres which is a very popular and powerful relational database (aka SQL Database). Provisioning and configuring relational databases requires specialised administration skills. With Supabase you can, in less than 2 minutes, get a Postgres database without any maintenance costs. It’s 100% portable, so you can migrate away at any time to another SQL database.
Supabase includes the following services:
One way of seeing Supabase is an integrated system of open source tools which work together perfectly. Specifically, Supabase creates a server on AWS and installs Postgres together with Kong, PostgREST, GoTrue and the other tools.
We can choose in which region we want Supabase to install our server (e.g. eu-west-2 London, eu-west-1 Ireland etc). This is important for GDPR.
It is possible to install the server in your own premises or to Bring Your Own Cloud (BYO). Of specific interest is BYO since it allows the installation of Supabase in an AWS Account of your choosing. This will happen through AWS Marketplace which is a great boost to core security and compliance requirements.
Supabase provides a variety of tools that allows us to track how the server performs. These are easy to use and can be customised by the administrator.
AWS has over 200 services. This can be daunting for newcomers to pickup. Amplify offers an easy entry to the AWS ecosystem with a focus on serverless infrastructure. This has cost, scalability and development time benefits. Supabase positions itself as an open source Firebase alternative (a very popular backend as a service from Google). Its core offer is that it is built around Postgres. Postgres is a very mature, performant and popular SQL database. Using a variety of other open source tools it aims to allow quick and robust development of applications that require database, user management and storage capabilities.
AWS Amplify has been around for longer than Supabase. It has been battle tested on a lot of products from smaller and bigger companies. AWS Amplify is more mature but Supabase is catching up fast and is being used on services in production. Supabase is built on top of existing open source tools which allowed them to make a strong offer in a short period of time. Also, Supabase has a more focused vision which allows them to move fast.
Amplify has a variety of tools. The core is the client libraries, the CLI (Command Line Interface) and the server APIs (e.g. Cognito, DynamoDB etc). Using CLI, developers can quickly set-up serverless environments and use the client libraries to communicate with the server APIs. The CLI generates client and server code that glues together the user interface with the server. Also, users can use the AWS Console to access the different services (e.g. DynamoDB dashboard).
Supabase is built around Postgres. When creating a new table they immediately offer an API to access the database (from client libraries) using PostgresREST. This removes the need to generate client or server side code as Amplify does. User management happens using Postgres, so it has a closer integration than the Cognito, AppSync, DynamoDB, Amplify offer.
There are a lot of aspects to cover here, but I’m concentrating on what I think makes a difference on most of our projects. Using client and server code generation Amplify simplifies accessing the underlying AWS services. But it also means when something doesn’t work as expected developers need to dig deep on the generated code. There are a lot of complaints from developers on how difficult VTL is to follow. Supabase doesn’t require any code generation due to the integration of PostgresREST.
Updating the database schema, even adding a single field in an existing table, can take 5 mins to complete. This breaks the productivity flow. Supabase schema changes take no more than a couple of seconds.
DynamoDB is a great offer for large databases that need fast and predictable performance. A lot of the projects we work on don’t have thousands or millions of users and therefore DynamoDB’s strong points do not necessarily shine. In addition, DynamoDB is not as flexible as Postgres or any other SQL database. With DynamoDB it is recommended to know beforehand the access patterns (how the database will be queried) before deciding the database schema. Most new projects have an organic model of development which means that retrofitting new requirements is unnecessarily complex.
Postgres in comparison is very flexible and allows you to easily change the schema. In addition, querying and creating relationships between tables is very powerful using SQL. For Amplify to have the equivalent capabilities the recommendation is to stream the data to a secondary service, OpenSearch. OpenSearch provides powerful querying capabilities, but it increases the maintenance and costs.
Amplify uses Cognito and DynamoDB which are very cost-effective. In addition, the use of Lambdas to add additional logic is very cost-effective as well. Currently we have applications with very low cost in the few 10s of dollars. Supabase costs depend on usage. Based on our current projects workload I don’t expect this to be much higher than $25 per month. So overall Amplify is a cheaper option. This is due to the fact that there is no upfront cost for the services and low projected usage.
Both services can scale and perform well under a lot of pressure. Amplify (mainly due to DynamoDB) is probably a better database for really large usage. But Postgres can also scale to accommodate a large workload if brought into the BYO cloud environment.
Both products have active support on Github as well as Discord where company members and users provide support. In addition, both offer additional paid support if needed.
Amplify has been around longer so there are more learning resources available. For Supabase there are fewer resources but whilst I’ve been researching them I’ve seen good resources appear. Good knowledge of SQL and Postgres usually is enough to answer most of the common questions. Egghead provides a good list of resources.
Amplify being an AWS product has a multitude of services to observe and monitor the state of the services. Supabase has introduced a set of easy to use reports to provide insights on the service and the database.
Talk to us about your business plans. We can assist with the creation of your upcoming mobile app, web application, educational game or digital marketing campaign.
Our knowledgeable staff of app designers and software developers are available to answer all of your inquiries. No matter how simple or complex they may be.
Whether it is about digital product design, lean UX, or custom software development we can help.