Which solution will satisfy these requirements?
Use an AWS CloudFormation template with a retention policy for the ALB set to 1 hour. Update the Amazon Route 53 record to reflect the new ALB.
Use two AWS Elastic Beanstalk environments to perform a blue/green deployment from the original environment to the new one. Create an application version lifecycle policy to terminate the original environment in 1 hour.
Use AWS CodeDeploy with a deployment group configured with a blue/green deployment configuration Select the option Terminate the original instances in the deployment group with a waiting period of 1 hour.
Use AWS Elastic Beanstalk with the configuration set to Immutable. Create an .ebextension using the Resources key that sets the deletion policy of the ALB to 1 hour, and deploy the application.
Explanations:
AWS CloudFormation is not ideal for this scenario as it does not natively support blue/green deployments or traffic transition between two fleets. The retention policy for the ALB is unrelated to maintaining traffic during the transition. Also, Route 53 updates would not ensure a smooth transition without downtime.
While AWS Elastic Beanstalk supports blue/green deployments, using two environments with an application version lifecycle policy does not provide a direct mechanism for automatic termination of the original environment after 1 hour. Manual steps would still be required, making it less suitable.
AWS CodeDeploy with a blue/green deployment configuration allows for launching a second fleet while maintaining the original fleet. It can transition traffic to the new fleet once fully deployed and automatically terminate the original fleet after a specified waiting period, which satisfies all requirements.
While Elastic Beanstalk can use an immutable deployment strategy, setting the deletion policy of the ALB through .ebextensions is not a standard practice. Moreover, it lacks the direct control over traffic transition and termination timing needed for this scenario, leading to potential issues in managing the deployment lifecycle.