DOP-C02 Question 103
Select 3Your team is managing an application deployed on Amazon EC2 instances in an Auto Scaling group. You need to implement a configuration management strategy to ensure that new instances in the group are consistently configured with the latest application version and dependencies. Additionally, the configuration process should minimize downtime and allow for configuration drift detection. Which of the following approaches meet these requirements?
- A
Use AWS Systems Manager State Manager to enforce the desired configuration on all instances and schedule periodic compliance checks.
- B
Bake the application and its dependencies into a custom Amazon Machine Image (AMI) and update the Auto Scaling group to use the new AMI when changes are required.
- C
Use a user data script to install and configure the application and its dependencies when new instances are launched.
- D
Leverage AWS OpsWorks to define and manage the application configuration using Chef or Puppet recipes.
- E
Rely on manual SSH-based configuration of the EC2 instances after they are launched to ensure they meet the desired state.
Show answer and explanation
Correct answers: A, B, D
Explanation
To meet the requirements of consistent application configuration, minimal downtime, and configuration drift detection, a combination of automated and scalable tools like AWS Systems Manager State Manager, custom AMIs, or AWS OpsWorks is suitable. These approaches ensure reliable and repeatable configuration management, while manual or initial-only solutions like user data scripts or SSH-based configuration do not meet the ongoing compliance and automation needs.
- A. Correct.
AWS Systems Manager State Manager provides a declarative way to enforce configuration compliance on EC2 instances and can detect drift. It is ideal for ongoing configuration management.
- B. Correct.
Using a custom AMI ensures that new instances are launched with the desired application version and configuration, reducing setup time and minimizing downtime.
- C. Incorrect.
User data scripts are useful for initial configuration but are not ideal for ongoing configuration management or configuration drift detection.
- D. Correct.
AWS OpsWorks is a managed configuration management service that supports Chef and Puppet, enabling you to define and enforce application configurations consistently.
- E. Incorrect.
Manual SSH-based configuration is error-prone, time-consuming, and does not support automation or scalability, making it unsuitable for this use case.