What deployment methodology should be used to update the running environments to meet the requirement?
Use fully baked AMIs (ג€golden imagesג€) created after each successful build, creating a new Auto Scaling group, and blue/green deployments with rollbacks.
Use user-data scripts to configure the instance correctly on boot by installing all dependencies when needed.
Use an AWS Lambda function to only update the application locally on each instance, then re-attach it to the load balancer when the process complete.
Use AWS OpsWorks scripts to execute on reboot of each instance to install all known dependencies, then re-attach the instances to the load balancer.
Explanations:
Fully baked AMIs allow for faster deployments as they come with all dependencies pre-installed. This method enables quick replacement of instances in an Auto Scaling group with blue/green deployments and rollback capabilities, minimizing downtime and ensuring consistency.
Using user-data scripts to configure the instance on boot adds additional time to the instance startup as dependencies are installed during boot, making it slower than using pre-baked AMIs and less efficient for quick operational readiness.
AWS Lambda is not designed for updating application dependencies on instances directly. It’s better suited for event-driven computing, and this approach would not ensure all dependencies are installed before the application is live.
AWS OpsWorks can automate dependency installation, but executing on reboot might delay the process. This method is slower compared to using pre-baked AMIs and doesn’t ensure fast instance readiness.