A small application that’s frequently updated must be installed automatically on all new EC2 instances. What is the simplest method to install it when instances launch?
Choose an answer
Tap an option to check your answer.
Correct answer: Provide an EC2 user-data script that downloads and installs the application during instance boot..
Why this is the answer
The simplest and most direct method for installing an application on new EC2 instances during launch is to use an EC2 user-data script. User data scripts execute automatically the first time an instance boots, allowing you to download and install software, configure settings, or run other commands. This approach is ideal for frequently updated, small applications as it ensures every new instance has the latest version without manual intervention or pre-baking AMIs. Building a custom API with API Gateway and invoking an installer from a CloudFormation template is overly complex for this requirement. Having AWS Systems Manager inject the application into the AMI is not a standard or direct Systems Manager capability; Systems Manager is typically used for post-launch management. Using AWS CodePipeline to push application code and perform installations is a CI/CD solution, which is more robust but also more complex than needed for simply installing an application on new instances.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed