Which solution will meet these requirements?
Use AWS CloudFormation to create an AWS Step Functions state machine and Auto Scaling lifecycle hooks to move to one instance at a time into a wait state. Use AWS Systems Manager automation to deploy the update to each instance and move it back into the Auto Scaling group using the heartbeat timeout.
Use AWS CodeDeploy with Amazon EC2 Auto Scaling Configure an alarm tied to the CPU utilization metric. Use the CodeDeployDefault OneAtAtime configuration as a deployment strategy. Configure automatic rollbacks within the deployment group to roll back the deployment if the alarm thresholds are breached.
Use AWS Elastic Beanstalk for load balancing and AWS Auto Scaling. Configure an alarm tied to the CPU utilization metric. Configure rolling deployments with a fixed batch size of one instance. Enable enhanced health to monitor the status of the deployment and roll back based on the alarm previously created.
Use AWS Systems Manager to perform a blue/green deployment with Amazon EC2 Auto Scaling. Configure an alarm tied to the CPU utilization metric. Deploy updates one at a time. Configure automatic rollbacks within the Auto Scaling group to roll back the deployment if the alarm thresholds are breached.
Explanations:
While using AWS CloudFormation and Step Functions can manage deployments, it does not provide built-in support for automatic rollback based on CPU utilization metrics. Additionally, using lifecycle hooks and Systems Manager automation adds complexity without directly addressing the requirement for automatic rollback.
AWS CodeDeploy with Amazon EC2 Auto Scaling is designed for rolling deployments, allowing updates one instance at a time. The CodeDeployDefault OneAtATime deployment strategy ensures only one instance is updated at a time. Furthermore, CodeDeploy can automatically roll back deployments if an alarm for CPU utilization (exceeding 85%) is triggered, which meets all the specified requirements.
AWS Elastic Beanstalk can handle rolling deployments, but it does not have the same level of control over individual instance deployment as AWS CodeDeploy. While it can monitor CPU utilization and rollback, the requirement for deployment to be handled one instance at a time is not as precise or customizable as in CodeDeploy.
AWS Systems Manager can manage blue/green deployments, but it does not inherently support the rolling update strategy of one instance at a time. While it can monitor CPU utilization and trigger alarms, automatic rollback based on the alarm is not standard functionality for blue/green deployments in this context, making it less suited for the requirements specified.