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)

Container Image Tags

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

FeatureMô tả
CI/CDAuto build + deploy on git push
PreviewsPR preview URLs
Custom domainsRoute 53 integration
SSRServer-side rendering support (Next.js)
Rewrites/RedirectsURL rewriting rules

Amplify Libraries (Client SDK)

CategoryServices
AuthCognito (sign-up, sign-in, MFA)
APIAppSync (GraphQL), API Gateway (REST)
StorageS3 (file upload/download)
DataStoreOffline-first data sync
AnalyticsPinpoint
// 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.