AWS Certified Sysops Administrator Associate · Free Practice Question Medium
Question 26
A bespoke application must be installed on a fleet of Amazon EC2 instances. The application is updated frequently and can be installed automatically. How can the application be deployed on new EC2 instances?
-
A
Create an AWS CloudFormation stack and use a change set to deploy to EC2.
-
B
Create a script that downloads and installs the application using EC2 user data.
-
C
Use AWS Systems Manager to inject the application into an AMI.
-
D
Use AWS Config to detect application updates and trigger an update process.
Reveal correct answer
Correct answer: B
Explanation
An up to date version of the application must be installed on new EC2 instances. A simple solution for this is to run a script that downloads the latest binaries for the application and installs it through EC2 user data. This will ensure that all new instances have the latest software installed.
CORRECT: "Create a script that downloads and installs the application using EC2 user data" is the correct answer.
INCORRECT: "Use AWS Config to detect application updates and trigger an update process" is incorrect. AWS Config can be used to detect configuration of AWS resources. However, it would be better to just install the application at system startup rather than detect it’s missing.
INCORRECT: "Use AWS Systems Manager to inject the application into an AMI" is incorrect. You can patch AMIs using Systems Manager but adding an application is not possible.
INCORRECT: "Create an AWS CloudFormation stack and use a change set to deploy to EC2" is incorrect. You cannot use change sets to deploy applications to newly created instances.
References:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
Save time with our AWS cheat sheets:
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
