3.3.5 Manage Environments in AWS Services
Manage Environments in Individual AWS Services
API Gateway
| Feature | Dev | Staging | Prod |
|---|
| Stage | /dev | /staging | /prod |
| Throttling | Low | Medium | High |
| Logging | Full | Full | Errors only |
| Caching | Off | Off | On |
Lambda
| Feature | Dev | Prod |
|---|
| Alias | → $LATEST | → Version N |
| Concurrency | Unreserved | Reserved |
| Provisioned | No | Yes (if needed) |
| Env vars | Dev config | Prod config |
DynamoDB
# Conditional capacity per environment
MyTable:
Type: AWS::DynamoDB::Table
Properties:
BillingMode: !If [IsProd, PROVISIONED, PAY_PER_REQUEST]
ProvisionedThroughput: !If
- IsProd
- ReadCapacityUnits: 100
WriteCapacityUnits: 50
- !Ref AWS::NoValue
Elastic Beanstalk
eb create my-app-dev --envvars STAGE=dev
eb create my-app-prod --envvars STAGE=prod
eb use my-app-dev # Switch active environment
Parameter Store per Environment
/myapp/dev/db-host → dev-db.example.com
/myapp/prod/db-host → prod-db.example.com
/myapp/dev/log-level → DEBUG
/myapp/prod/log-level → ERROR
Exam Tip: API Gateway stages for environment separation. Lambda aliases for version management. Parameter Store hierarchy for per-env config. CloudFormation Conditions for env-specific resources.