Q42 — AWS DOP-C02 Ch.3
Question 42 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 upon launch and wants changes to the configuration files in the CloudFormation template to be reflected on running instances with minimal delay. 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 the 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 the 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 the configuration file content in the launch template. Add an AWS Systems Manager Resource DataSync resource to the template to poll for configuration updates.
- D. In the CloudFormation template, add CloudFormation Init metadata. Place the 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 the 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
It uses managed services.