You are building out a layer in a software stack on AWS that needs to be able to scale out to react to increased demand
as fast as possible. You are running the code on EC2 instances in an Auto Scaling Group behind an ELB. Which
application code deployment method should you use?
A.
SSH into new instances that come online, and deploy new code onto the system by pulling it from an S3 bucket, which is populated
by code that you refresh from source control on new pushes.
B.
Bake an AMI when deploying new versions of code, and use that AMI for the Auto Scaling Launch Configuration.
C.
Create a Dockerfile when preparing to deploy a new version to production and publish it to S3. Use UserData in the Auto Scaling
Launch configuration to pull down the Dockerfile from S3 and run it when new instances launch.
D.
Create a new Auto Scaling Launch Configuration with UserData scripts configured to pull the latest code at all times.
Explanation:
… the bootstrapping process can be slower if you have a complex application or multiple applications to install. Managing
a fleet of applications with several build tools and dependencies can be a challenging task during rollouts. Furthermore,
your deployment service should be designed to do faster rollouts to take advantage of Auto Scaling.
https://d0.awsstatic.com/whitepapers/overview-of-deployment-options-on-aws.pdf
B
Pre baking the AMI is the best solution to bootstrap instance and save time.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html
Baked AMI is good for fast deploys. Docker would be better but it does not come from S3 it comes from Docker Registry