A custom application must be installed on all Amazon EC2 instances. The application is small, updated frequently and can be installed automatically. How can the application be deployed on new EC2 instances?
A.
Launch a script that downloads and installs the application using the Amazon EC2 user data.
B.
Create a custom API using Amazon API Gateway to call an installation executable from an AWS CloudFormation Template.
C.
Use AWS Systems Manager to inject the application into an AMI.
D.
Configure AWS CodePipeline to deploy code changes and updates.
Good point. I was almost tempted to say that D was the right answer. CodePipeline can be triggered if there are updates to the application code, but not when "new" EC2 instances are launched. The only way to deploy the application on new instances is through User Data. I agree A is the most appropriate answer in this case.
A: Correct (A way to Install apps on new EC2 instances)
B: Complicated and Out of scope
C: SSM can be used to patch exiting AMIs or injecting apps into EC2 instances, not AMIs (I think)
D: Codepipeline deploy code changes and updates to existing EC2 instances using CodeDeploy or AWS Elastic Beanstalk. We are more looking at installing the app on a new EC2 instance which why I would rather choose A as an answer.
Using Amazon EC2 user data is a simple and efficient way to install a small and frequently updated application during the instance boot process. User data scripts run when the instance launches, and they can include commands to download and install applications automatically.
A - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
The application is self sustaining ie no intervention needed post install, but pre-install, user data can be used.
I believe D is better than A
because question Say that application is *updated frequently* ..
yes question mention it's a new instance but that doesn't prevent us from using code deploy after New instance is initialized .
1. EC2 instances are already deployed(leaves A and D). 2. When efficiency or cost isn't mentioned AWS defaults to looking for the lowest cost. Codepipeline is $1 per pipeline every 30 days.
C mentions injecting the code into the AMI. The AMI has to be deployed, updated and recreated. This doesn't help the existing deployed instances.
I go with A.
TRICK QUESTION: "How can the application be deployed on new EC2 instances?"
Answer is A. Launch a script that downloads and installs the application using the Amazon EC2 user data.
I agree that A can be used for installing instances.
However, there is another question.
Can D also be used for installing instances?
That's what I am wondering...
i Think it should be C --> You can use the AWS Management Console or the AWS CLI to deploy packages to your AWS Systems Manager managed instances by using AWS Systems Manager Distributor. You can currently deploy one version of one package per command. You can install new packages or update existing installations in place. You can choose to deploy a specific version or choose to always deploy the latest version of a package for deployment. We recommend using State Manager to install packages. Using State Manager helps ensure that your instances are always running the most up-to-date version of your package.
AWS CodePipeline automates your software release process, allowing you to rapidly release new features to your users. With CodePipeline, you can quickly iterate on feedback and get new features to your users faster.
Automating your build, test, and release process allows you to quickly and easily test each code change and catch bugs while they are small and simple to fix. You can ensure the quality of your application or infrastructure code by running each change through your staging and release process.
Isn't user data loaded at instance reboot? If so, for change to take effect every time, an instance reboot will be needed. Otherwise, https://aws.amazon.com/codepipeline/?nc=sn&loc=1, the benefit of CodePipeline
"AWS CodePipeline is a fully managed continuous delivery service that helps you automate your release pipelines for fast and reliable application and infrastructure updates. CodePipeline automates the build, test, and deploy phases of your release process every time there is a code change, based on the release model you define. "
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Wmatt
Highly Voted 3 years, 1 month agosmplysam
3 years, 1 month agoshammous
Highly Voted 3 years agoAresius
Most Recent 4 months, 1 week agojyrajan69
6 months, 1 week agoFinger41
2 years, 4 months agoahaffar
2 years, 11 months agoKimle
2 years, 11 months agosolotvun
2 years, 11 months agoCountryGent
2 years, 11 months agokhun
2 years, 11 months agoChirantan
2 years, 11 months agoabhishek_m_86
3 years agoWeekly_diary
3 years agoChirantan
3 years agoChirantan
2 years, 11 months agowannaaws
3 years agokiev
3 years agokiev
3 years ago