Getting Started with Full-Stack Web App Development on AWS Amplify - Git-Connected Deploys and Backend Setup

Set up automatic per-branch deployment environments with GitHub integration, and define authentication, APIs, and storage in TypeScript using Backend Gen 2. Also supports Next.js SSR.

Overview of Amplify

Amplify is a service that integrates the building and hosting of full-stack web and mobile applications. Amplify Hosting provides CI/CD connected to Git repositories along with global CDN hosting, while Amplify Backend (Gen 2) lets you define and deploy backend resources like authentication, APIs, and storage using TypeScript and CDK. Compared to Vercel and Netlify, native integration with AWS services (Cognito, AppSync, DynamoDB) is the key differentiator. It supports major frameworks including React, Next.js, Vue, Nuxt, and Angular, with both SSR and SSG support.

Hosting and Backend

Amplify Hosting sets up automatic per-branch deployment environments simply by connecting a GitHub repository. The main branch can serve as the production environment and the develop branch as the staging environment. Amplify Backend defines backend resources in TypeScript. Authentication uses Cognito User Pool, APIs use AppSync (GraphQL) or API Gateway (REST), and storage uses S3 buckets, all automatically provisioned. The amplify sandbox command launches an independent backend environment for each developer, preventing environment conflicts during team development.

Custom Domains and SSR

Amplify Hosting provides custom domain configuration and automatic SSL certificate issuance. Connecting a Route 53 domain automatically configures DNS settings. SSR (Server-Side Rendering) supports Next.js and Nuxt, executing server-side rendering via Lambda@Edge. Preview environments are automatically generated for each pull request, and merging after review triggers automatic deployment to production. Environment variables can be set per branch, allowing different API endpoints for development, staging, and production. For a systematic study of web hosting, related books on Amazon are also a useful reference.

Amplify Pricing

Amplify Hosting build pricing is approximately $0.01 per minute, hosting is approximately $0.023 per GB per month, and requests cost approximately $0.15 per million requests. SSR requests incur additional Lambda@Edge charges. The free tier includes 1,000 build minutes per month, 15 GB of hosting, and 5 GB of data transfer. Amplify Backend (Gen 2) is billed at the individual rates of the AWS services used (AppSync, DynamoDB, Cognito, S3). Leverage build caching to reduce build times and lower build costs.

Summary

Amplify is a service that integrates frontend hosting and backend provisioning for web applications. It sets up automatic per-branch deployment environments through Git repository integration and supports Next.js SSR. Backend Gen 2 enables code-based backend definitions, significantly boosting full-stack development productivity.