A SysOps Administrator is using AWS CodeDeploy to deploy an update to an application running on a fleet of Amazon EC2 instances. The deployment must guarantee that at least of the instances are healthy and serving traffic at any given time during the deployment. If any instance fails the update, the deployment must automatically revert to the previous working version.
Which configuration will meet these requirements?
- Create a custom deployment configuration with the minimum healthy hosts set to using the percentage type, and configure the deployment group to roll back automatically when a deployment fails.Cevap
- BUse the CodeDeployDefault.HalfAtATime predefined deployment configuration, and configure an Amazon CloudWatch alarm to trigger a rollback if any instance goes offline.
- CCreate a custom deployment configuration with the minimum healthy hosts set to using the percentage type, and configure the deployment group to roll back automatically when a deployment fails.
- DDeploy the application using an AWS CloudFormation stack update, and rely on the CloudFormation rollback execution role to automatically revert the CodeDeploy deployment if a failure is detected.
Cevap
Create a custom deployment configuration with the minimum healthy hosts set to using the percentage type, and configure the deployment group to roll back automatically when a deployment fails.
Creating a custom deployment configuration with the minimum healthy hosts set to ensures that CodeDeploy updates at most of the instances at a time, keeping at least of the fleet healthy. Enabling the automatic rollback option on deployment failure in the deployment group ensures that CodeDeploy automatically reverts to the last known good version if any instance fails to deploy successfully.
Adım Adım Çözüm
Anahtar Kavram
AWS CodeDeploy Deployment Configurations and Automatic Rollback Settings