Amplify
๐ง What Is AWS Amplify?¶
AWS Amplify is a full-stack serverless platform that enables frontend and mobile developers to build, deploy, and host modern applications with built-in tools for:
-
โ Authentication
-
โ APIs (GraphQL/REST)
-
โ Storage (S3, DynamoDB)
-
โ Hosting (CI/CD for React, Angular, Next.js, Vue, etc.)
-
โ Functions (Lambda)
-
โ Analytics, PubSub, Predictions (AI/ML)
๐งฑ Core Components¶
| Component | Purpose |
|---|---|
| Amplify CLI | Configure backend services using terminal (Node.js based) |
| Amplify Console | Web-based UI for CI/CD + Hosting + Backend Management |
| Amplify Libraries | Prebuilt JS/Flutter/iOS/Android libraries for connecting frontend |
| Amplify Hosting | Fully managed CI/CD + global CDN for web apps |
| Amplify Studio | Visual low-code interface for UI + backend + content (Figma integration) |
๐ Why Use Amplify?¶
| Feature | Benefit |
|---|---|
| ๐ง Quick Backend Setup | Add Auth, API, Storage in minutes |
| โ๏ธ No Backend Expertise | Focus on frontend, Amplify handles infra |
| ๐ Secure by default | Uses Cognito, IAM, least-privilege access |
| ๐ Global Hosting | Frontend deployed via CloudFront |
| ๐ CI/CD Integration | Auto-deploy from GitHub, GitLab, Bitbucket |
| ๐ Seamless AWS Integration | Easily connect to Lambda, DynamoDB, S3, etc. |
๐งช Example Workflow¶
npm install -g @aws-amplify/cli
amplify configure # One-time AWS setup
amplify init # Initialize Amplify in project
amplify add auth # Add authentication (Cognito)
amplify add api # Add REST or GraphQL API
amplify add storage # Add S3 or DynamoDB
amplify push # Deploy backend
Then use the generated code with:
โ๏ธ Key Features Breakdown¶
1. Authentication¶
-
Backed by Amazon Cognito
-
Prebuilt UI components (React, Vue, Angular)
-
Social login (Google, Facebook, Apple, Amazon)
-
MFA, custom user attributes
2. API (GraphQL or REST)¶
-
GraphQL powered by AWS AppSync
-
REST powered by API Gateway + Lambda
-
Auto-generate resolvers, models, and CRUD operations
3. Storage¶
-
S3 for file/object storage
-
DynamoDB for NoSQL
-
Built-in access control with IAM/Cognito
4. Functions¶
-
Add AWS Lambda functions to your app
-
Trigger from APIs, storage events, or on-demand
-
Supports local testing and environment variables
5. Hosting (CI/CD)¶
-
Connect Git repo โ Amplify builds & deploys frontend + backend
-
Built-in previews for PRs
-
Custom domains + HTTPS + global CDN (CloudFront)
6. Analytics¶
-
User tracking via Amazon Pinpoint
-
Session, event tracking, engagement funnels
7. AI/ML with Predictions¶
-
Text-to-speech (Polly)
-
Text translation (Translate)
-
Image recognition (Rekognition)
-
Sentiment analysis (Comprehend)
๐ฅ๏ธ Amplify Studio¶
A visual app builder where you can:
-
Create UI from Figma designs
-
Add backend models visually
-
Bind UI components to data sources
-
Manage users and content via Admin UI
๐ Supported Frontend Frameworks¶
| Framework | CI/CD Hosting | Libraries |
|---|---|---|
| React / Next.js | โ | โ Amplify JS |
| Angular | โ | โ Amplify JS |
| Vue | โ | โ Amplify JS |
| Flutter | โ (no hosting) | โ Amplify Dart |
| iOS/Android | โ (no hosting) | โ Amplify Native SDKs |
๐งฉ Integration with Other AWS Services¶
| Service | Integration Role |
|---|---|
| Cognito | Authentication & User Pools |
| AppSync | GraphQL APIs |
| S3 | File uploads/downloads |
| Lambda | Business logic |
| DynamoDB | NoSQL storage |
| CloudFront | CDN for frontend |
| CloudWatch | Logs & Monitoring |
๐ก๏ธ IAM & Security¶
-
IAM roles generated per environment
-
Least privilege access policies auto-generated
-
Environments: dev, prod, staging
-
Supports custom roles and permissions
๐งฑ Terraform Support¶
Amplify is designed to be CLI and UI-driven, but Terraform can manage Amplify apps and hosting:
resource "aws_amplify_app" "myapp" {
name = "my-react-app"
repository = "https://github.com/user/repo"
oauth_token = var.github_token
}
resource "aws_amplify_branch" "main" {
app_id = aws_amplify_app.myapp.id
branch_name = "main"
}
Backend resources (like Cognito, AppSync) are better managed via CloudFormation or Terraform separately.
๐ฐ Pricing Overview¶
| Component | Pricing Basis |
|---|---|
| Hosting | Per build minute + per GB served |
| Auth (Cognito) | Free tier, then per MAU |
| AppSync (GraphQL) | Per request and data volume |
| Storage (S3) | Standard S3 pricing |
| Lambda | Pay-per-request/compute time |
| Predictions (ML) | Based on API used (e.g., Polly, Rekognition) |
โ TL;DR Summary¶
| Feature | AWS Amplify |
|---|---|
| Ideal For | Frontend developers needing full-stack infra |
| Backend Services | Auth, APIs, Storage, Functions |
| Deployment | CI/CD with GitHub, GitLab, Bitbucket |
| Hosting | Static or SSR with global CDN (CloudFront) |
| AI/ML Support | Text, speech, translate, image |
| Learning Curve | Low for frontend devs |
| Security | Built-in via Cognito and IAM |
| Terraform Support | Hosting only (backend infra via other tools) |