EC2 instances in an Auto Scaling group created by CloudFormation require a configuration file maintained in source control. Instances should have the latest configuration at launch, and changes to the CloudFormation template should be reflected on all instances with minimal delay. Which solution achieves this?
Choose an answer
Tap an option to check your answer.
Correct answer: Include CloudFormation init metadata in the template with the configuration file content. Configure cfn-init to run when the instance launches and configure cfn-hup to poll for updates..
Why this is the answer
The correct answer uses CloudFormation init metadata to embed the configuration directly within the CloudFormation template. When an instance launches, cfn-init processes this metadata to apply the configuration. For ongoing updates, cfn-hup polls CloudFormation for changes to the instance's metadata and applies them, ensuring minimal delay. Incorrect options: AWS Config rules are for auditing and compliance, not for deploying configuration files to instances. Placing configuration file content directly in an EC2 launch template is not ideal for dynamic updates and doesn't inherently provide a mechanism like cfn-hup for polling CloudFormation for changes. Systems Manager Resource Data Sync is for aggregating inventory data, not for deploying configuration. While an EC2 launch template is used, the key is how the configuration is applied and updated. Simply including content in the launch template without cfn-init/cfn-hup doesn't meet the requirement for minimal-delay updates. Systems Manager Resource Data Sync is not for configuration deployment.
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