How do you get automatic rollback on bad deployments?
AdvancedProductionObservability, Deployments and Governance
Answer
Tie deployments to CloudWatch alarms. ECS: enable the deployment circuit breaker with rollback: true plus the alarms configuration on the service so the deployment rolls back if a 5xx or latency alarm fires during bake time. CodeDeploy: deployment group alarms with automatic rollback on alarm. ASG instance refresh: alarm-based rollback with AutoRollback. Lambda: CodeDeploy hooks plus alarms. The quality of the rollback depends on alarms that react within the bake window.
More on Observability, Deployments and Governance
What should a production CloudWatch alarm strategy look like?IntermediateHow do you alert on an error-rate percentage instead of a raw count?IntermediateHow do you implement distributed tracing on AWS today?IntermediateHow do you define SLOs with AWS-native tools?AdvancedHow do you monitor from the user's perspective?BeginnerHow do you centralize observability across many accounts?Intermediate