AWS Certified DevOps Engineer – Professional — Question 115

An application running on a set of Amazon EC2 instances in an Auto Scaling group requires a configuration file to operate. The instances are created and maintained with AWS CloudFormation. A DevOps engineer wants the instances to have the latest configuration file when launched, and wants changes to the configuration file to be reflected on all the instances with a minimal delay when the CloudFormation template is updated. Company policy requires that application configuration files be maintained along with AWS infrastructure configuration files in source control.

Which solution will accomplish this?

Answer options

Correct answer: D

Explanation

Option D is correct because it uses CloudFormation init metadata to ensure that the configuration file is present and updated on instance launch and during runtime. The cfn-hup script will handle updates with minimal delay. Options A and C incorrectly use AWS Config and Resource Data Sync, which are not suitable for this scenario, while option B lacks the required metadata for proper configuration management.