3.3.3 Approved Versions for Integration Testing
Create Environments with Approved Versions
Lambda Aliases & Versions
$LATEST → mutable, always latest code
Version 1, 2, 3... → immutable snapshots
Alias "dev" → $LATEST
Alias "test" → Version 5 (approved for testing)
Alias "prod" → Version 4 (current production)
my-app:latest → Development
my-app:v1.2.3 → Specific version (immutable)
my-app:staging → Staging environment
my-app:prod → Production
# Tag and push specific version
docker tag my-app:latest 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app:v1.2.3
docker push 123456789012.dkr.ecr.us-east-1.amazonaws.com/my-app:v1.2.3
AWS Amplify Branches
main → Production
develop → Development
feature/* → Preview environments
- Branch-based deployments
- Automatic preview URLs per branch
- Environment variables per branch
Amplify Hosting
| Feature | Mô tả |
|---|
| CI/CD | Auto build + deploy on git push |
| Previews | PR preview URLs |
| Custom domains | Route 53 integration |
| SSR | Server-side rendering support (Next.js) |
| Rewrites/Redirects | URL rewriting rules |
Amplify Libraries (Client SDK)
| Category | Services |
|---|
| Auth | Cognito (sign-up, sign-in, MFA) |
| API | AppSync (GraphQL), API Gateway (REST) |
| Storage | S3 (file upload/download) |
| DataStore | Offline-first data sync |
| Analytics | Pinpoint |
// Amplify Auth example
import { Amplify } from 'aws-amplify';
import { signIn } from 'aws-amplify/auth';
const user = await signIn({
username: '[email]',
password: 'password123'
});
AWS Copilot Environments
copilot env init --name test --profile aws-test
copilot env init --name prod --profile aws-prod
copilot svc deploy --env test
Exam Tip: Lambda versions = immutable snapshots. Aliases = stable pointers. Container tags for version pinning. Amplify branches = automatic environments.