eb create my-app-dev --envvars STAGE=dev
eb create my-app-prod --envvars STAGE=prod
eb deploy my-app-dev
.ebextensions/ for configCluster: my-cluster
Service: my-app-dev → Task Def v3
Service: my-app-prod → Task Def v2
copilot env init --name test
copilot env init --name prod
copilot svc deploy --env test
copilot svc deploy --env prod
Parameters:
Stage:
Type: String
AllowedValues: [dev, staging, prod]
Conditions:
IsProd: !Equals [!Ref Stage, prod]
Exam Tip: Beanstalk = managed environments. ECS = container environments. Copilot = simplified ECS. CloudFormation Parameters + Conditions for env-specific resources.