AWS Amplify
A full-stack development platform that enables frontend developers to build and deploy backend features like authentication, APIs, and storage with minimal code
Overview
AWS Amplify is a platform that accelerates full-stack development of web and mobile applications. With Amplify Gen 2, you define backend resources (authentication, data, storage, functions) in TypeScript and deploy both frontend and backend simultaneously with a single Git push. It supports major frameworks including React, Next.js, Vue, Angular, and Flutter, integrating Cognito-based authentication, AppSync-powered GraphQL APIs, and S3 file storage with just a few lines of code. Amplify Hosting provides static site and SSR hosting with a built-in CI/CD pipeline.
Code-First Definitions in Gen 2 and the CDK Foundation
Amplify Gen 2 adopts CDK-based backend definitions. You write Cognito authentication settings in amplify/auth/resource.ts, AppSync schema and access rules in amplify/data/resource.ts, and S3 bucket configuration in amplify/storage/resource.ts, all in TypeScript. These are internally converted to CDK constructs and deployed via CloudFormation. The biggest difference from Gen 1 is the shift from CLI wizard-style configuration to code-first TypeScript definitions, making backend settings version-controllable and dramatically improving reproducibility in team development. Using sandbox environments (npx ampx sandbox), each developer can instantly spin up an independent backend environment for development and testing without affecting production. While Google's Firebase offers easier initial setup with Firestore-centered real-time sync, Amplify provides access to the full AWS ecosystem - advanced Cognito authentication flows (SAML, OIDC federation), flexible AppSync GraphQL resolvers, and Lambda-based custom logic - giving it stronger enterprise capability and scalability for large-scale workloads.
Hosting CI/CD and Preview Environments
Amplify Hosting integrates with GitHub repositories and automatically generates preview environments for each pull request, streamlining team review workflows. When a branch is pushed, Amplify triggers a build pipeline that deploys both the frontend and backend to an isolated environment with a unique URL, enabling reviewers to verify changes without affecting production. Build settings are configured in amplify.yml at the project root, where you can define build commands, environment variables, and custom build images per branch. For production deployments, Amplify supports custom domain configuration with automatic SSL certificate provisioning via ACM, and you can set up branch-based routing to map specific branches to subdomains (e.g., dev.example.com for the develop branch). For further reading, web app development books (Amazon) are a helpful resource.
Amplify's Limitations and When to Graduate to CDK
Amplify's most effective use case is rapid MVP (Minimum Viable Product) development - it is ideal for startups and new projects that need to launch an authenticated web application in a single day. However, backend resources generated by Amplify are managed internally as CloudFormation stacks, so when customization beyond Amplify's framework is needed (integration with VPC resources, complex IAM policies, fine-grained resource configuration), you must either use CDK override features or make the decision to graduate from Amplify to a pure CDK project. Signs that it is time to graduate include needing direct control over networking (VPC peering, PrivateLink), requiring custom CloudFormation resources, or finding that Amplify's abstraction layer is hiding critical configuration details. The migration path is relatively smooth since Gen 2 already uses CDK under the hood - you can incrementally extract resources from Amplify into standalone CDK stacks while keeping the frontend hosting on Amplify.