Updated Nov 27, 20267 min read

AWS Amplify vs Firebase for Your App Backend

A head-to-head comparison of AWS Amplify and Firebase for apps with a web or mobile frontend: data models, auth, functions, schedules, local development, pricing and what to do when the backend outgrows a backend-as-a-service.

Illustration for AWS Amplify vs Firebase for Your App Backend

AWS Amplify is the AWS toolkit for frontend teams, where Gen 2 describes auth, data, storage and functions in TypeScript files that it turns into CloudFormation in your own account. Firebase is Google's backend-as-a-service, with Firestore, Auth, Cloud Functions and hosting behind client SDKs.

Both let a small team ship a working app without running servers, and they differ in where the resources live, how data is modeled and how much of the backend can be run on a laptop.

How do Amplify and Firebase compare at a glance?

AWS AmplifyFirebase
DatabaseAmplify Data: GraphQL on AppSync, DynamoDB by defaultCloud Firestore and Realtime Database, SQL Connect for PostgreSQL
AuthAmazon CognitoFirebase Authentication
Server codeLambda functions, with an optional scheduleCloud Functions, including scheduled functions
File storageS3Cloud Storage for Firebase
HostingAmplify Hosting with SSR supportFirebase Hosting and App Hosting
Local developmentCloud sandbox per developerEmulator Suite on your machine
Where it runsResources in your AWS accountGoogle Cloud, managed through the Firebase project
Entry pricingPay per use, build minutes and data servedSpark free plan, Blaze pay as you go

Amplify details are from the Amplify documentation and its pricing page, and Firebase details from its pricing page and Cloud Functions docs, checked November 27, 2026.

How do the data models compare?

Amplify Data turns a TypeScript schema into a GraphQL API on AppSync with DynamoDB tables behind it, and authorization rules in the schema decide who may read and write each model. A relational question such as orders per customer per month is answered by designing an index for it up front, or by exporting the data somewhere else.

Firestore stores documents in collections, queried through client SDKs that can also listen for changes, with security rules written in their own language deciding access. Queries are limited to what an index can serve, so the same up-front design applies, and joins happen in the client or in a function. Firebase SQL Connect adds a Cloud SQL for PostgreSQL option with a three month trial and instances from $9.37 a month, so teams that want SQL do not have to leave the platform.

How do functions, schedules and local development compare?

Amplify functions are Lambda functions defined next to the rest of the backend, with a schedule option for recurring work, and the local loop is npx ampx sandbox, which deploys a stack per developer into your AWS account and redeploys it as files change. Firebase Cloud Functions cover HTTP endpoints, database triggers and schedules, and the Emulator Suite runs Auth, Firestore, Functions and Hosting locally.

Functions on both sides are billed per invocation and duration, and Firebase requires the Blaze plan for Cloud Functions. Neither one gives you a long-running service, so a worker that holds a connection or a queue consumer that polls has to be rewritten as event-driven functions.

How does pricing compare?

Amplify Hosting charges $0.01 per build minute, $0.15 per GB served and $0.30 per million server-side rendering requests, and the backend services underneath are billed at their own rates. New AWS accounts opened on or after 15 July 2025 get up to $200 in credits and a free plan for up to 6 months, as the AWS Free Tier page describes, while the 12 month Amplify Hosting free tier applies only to accounts opened before that date. Firebase has a free Spark plan with 1 GiB of Firestore storage and 50,000 reads a day, and the Blaze plan bills Firestore and Functions beyond a no-cost quota, with hosting data transfer at $0.15 per GB beyond 360 MB a day.

For a small app both stay inexpensive, and the surprise on either side is usually read volume, which is billed per operation on Firestore and per request on AppSync.

When does each one fit?

Pick Amplify when the team lives in AWS, wants Cognito and S3 in its own account, and is comfortable with DynamoDB access patterns. Pick Firebase for mobile apps that need realtime sync, offline support and push messaging with the least backend code. Pick neither for a backend with relational data, workers and several services, since that is where both start to push logic into functions.

How does Encore fit next to Amplify or Firebase?

Encore

Encore works alongside either one, taking over the part of the backend that outgrows functions: services with a Postgres database, Pub/Sub topics and buckets declared in code and running in your own AWS or GCP account. The frontend and hosting stay on Amplify or Firebase and call the backend through a typed client from encore gen client.

Application code passes through Encore and infrastructure guardrails to resources provisioned in your own AWS or GCP account.

Set up the app

Get started
brew install encoredev/tap/encore &&
encore app create
Copy

Run in your terminal to get started locally.

~
$ encore app create tasks --example=ts/hello-world$ cd tasks && mkdir -p tasks/migrations

The tasks folder also needs an encore.service.ts that exports new Service("tasks"). A task list is the usual first Firestore or DynamoDB collection, and as a service it keeps its data in Postgres, hands out upload URLs for attachments and publishes an event that a subscriber turns into a reminder:

// tasks/tasks.ts import { api, APIError } from "encore.dev/api"; import { SQLDatabase } from "encore.dev/storage/sqldb"; import { Bucket } from "encore.dev/storage/objects"; import { Topic, Subscription } from "encore.dev/pubsub"; const db = new SQLDatabase("tasks", { migrations: "./migrations" }); const attachments = new Bucket("task-attachments"); interface TaskCreated { taskId: number; } const created = new Topic<TaskCreated>("task-created", { deliveryGuarantee: "at-least-once" }); interface CreateRequest { owner: string; title: string; } export const create = api( { expose: true, method: "POST", path: "/tasks" }, async (req: CreateRequest): Promise<{ id: number }> => { if (!req.title.trim()) throw APIError.invalidArgument("title is required"); const row = await db.queryRow<{ id: number }>` INSERT INTO tasks (owner, title) VALUES (${req.owner}, ${req.title.trim()}) RETURNING id`; await created.publish({ taskId: row!.id }); return { id: row!.id }; }, ); export const list = api( { expose: true, method: "GET", path: "/tasks/owner/:owner" }, async ({ owner }: { owner: string }): Promise<{ tasks: { id: number; title: string; done: boolean }[] }> => { const tasks: { id: number; title: string; done: boolean }[] = []; for await (const t of db.query<{ id: number; title: string; done: boolean }>` SELECT id, title, done FROM tasks WHERE owner = ${owner} ORDER BY id DESC LIMIT 100`) { tasks.push(t); } return { tasks }; }, ); export const attachmentUrl = api( { expose: true, method: "POST", path: "/tasks/:id/attachment-url" }, async ({ id }: { id: number }): Promise<{ url: string }> => { const { url } = await attachments.signedUploadUrl(`task-${id}/file`, { ttl: 600 }); return { url }; }, ); new Subscription(created, "send-reminder", { handler: async ({ taskId }) => { // Claim the reminder so a redelivered event does not send it twice. const claimed = await db.queryRow<{ id: number }>` UPDATE tasks SET reminded_at = now() WHERE id = ${taskId} AND reminded_at IS NULL RETURNING id`; if (!claimed) return; console.log("reminder queued for task", taskId); }, });
-- tasks/migrations/1_create_tasks.up.sql CREATE TABLE tasks ( id BIGSERIAL PRIMARY KEY, owner TEXT NOT NULL, title TEXT NOT NULL, done BOOLEAN NOT NULL DEFAULT false, reminded_at TIMESTAMPTZ, created_at TIMESTAMPTZ NOT NULL DEFAULT now() ); CREATE INDEX tasks_owner_idx ON tasks (owner, id DESC);

encore run starts Postgres locally, applies the migration and runs the topic, the subscriber and a local bucket in process, so the whole flow works on a laptop without a sandbox stack or an emulator configuration. The Pub/Sub docs cover retries and dead-letter queues, and the database docs cover migrations. Listing tasks by owner is an ordinary query with an index, and a new report grouped by month is another query rather than a new access pattern.

To deploy, follow Connect your cloud account and push, then point the frontend at the backend URL. An AI coding agent asked to add a column or a second event edits the migration and the handler in one change and runs it locally before anyone reviews it.

Best fit: Teams that keep their Amplify or Firebase frontend and want a relational backend with queues and file uploads running as services in their own AWS or GCP account.

Which should you choose?

Choose Amplify for an AWS team that wants a generated backend in its own account, and Firebase for a mobile-first app that benefits from realtime sync and the local emulators. When the data turns relational or the backend needs workers and several services, keep the frontend where it is and move the backend to services you run in your own cloud.

Frequently asked questions

Is AWS Amplify or Firebase better for a new app?

Firebase is quicker to start with when the app is mostly client SDK calls to Firestore and Auth, and it has a local Emulator Suite. Amplify fits better when the team already runs on AWS and wants the backend to land in its own account as CDK-generated resources, at the cost of a cloud sandbox instead of a local emulator.

Does Amplify use DynamoDB and Firebase use Firestore?

Yes. Amplify Data generates a GraphQL API on AWS AppSync backed by DynamoDB by default, and Firebase's main database is Cloud Firestore, a document database with security rules. Both push you to model data around access patterns instead of joins.

Can Firebase or Amplify run SQL?

Yes. Both can reach Postgres, but neither is built around it. Firebase offers SQL Connect on a Cloud SQL for PostgreSQL instance, and Amplify can connect to an existing PostgreSQL database for its data layer.

How do I run a Postgres backend in my own AWS account instead of Amplify or Firebase?

Build the backend with Encore, declaring the database, topics and buckets in code, and deploy it to your own AWS or GCP account. The web or mobile app keeps its Amplify or Firebase frontend hosting and calls the backend through a generated typed client.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders