Q32 — AWS DOP-C02 Ch.3
Question 32 of 100 | ← Chapter 3
An application running on a set of Amazon EC2 instances in an Auto Scaling group requires configuration files to operate. These instances are created and maintained using AWS CloudFormation. A DevOps engineer wants instances to have the latest configuration files at launch and wants updates to configuration files reflected on running instances with minimal delay after CloudFormation template updates. Company policy requires application configuration files to be maintained alongside AWS infrastructure configuration files in source control.
- A. In the CloudFormation template, add an AWS Config rule. Place configuration file content in the rule's InputParameters property and set the Scope property to the EC2 Auto Scaling group. Add an AWS Systems Manager Resource Data Sync resource to the template to poll for configuration updates.
- B. In the CloudFormation template, add an EC2 Launch Template resource. Place configuration file content in the launch template. Configure the cfn-init script to run at instance launch and configure the cfn-hup script to poll for configuration updates.
- C. In the CloudFormation template, add an EC2 Launch Template resource. Place configuration file content in the launch template. Add an AWS Systems Manager Resource Data Sync resource to the template to poll for configuration updates.
- D. In the CloudFormation template, add CloudFormation Init metadata. Place configuration file content in the metadata. Configure the cfn-init script to run at instance launch and configure the cfn-hup script to poll for configuration updates. ✓
Correct Answer: D. In the CloudFormation template, add CloudFormation Init metadata. Place configuration file content in the metadata. Configure the cfn-init script to run at instance launch and configure the cfn-hup script to poll for configuration updates.
Explanation
D appears to be the correct answer. More details here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/deploying.applications.html