DOP-C02 · Question #211
A DevOps engineer has created an AWS CloudFormation template that deploys an application on Amazon EC2 instances. The EC2 instances run Amazon Linux. The application is deployed to the EC2 instances…
The correct answer is B. Refactor the user data commands to use the cfn-init helper script. Update the user data to install D. Refactor the user data commands to use an AWS Systems Manager document (SSM document). Option B: cfn-init is a powerful tool for managing configuration on EC2 instances. By using cfn- init, the DevOps engineer can ensure that the new application version is installed regardless of the current state of the instances. cfn-hup helps keep cfn-init updated with the…
Question
A DevOps engineer has created an AWS CloudFormation template that deploys an application on Amazon EC2 instances. The EC2 instances run Amazon Linux. The application is deployed to the EC2 instances by using shell scripts that contain user data. The EC2 instances have an IAM instance profile that has an IAM role with the AmazonSSMManagedinstanceCore managed policy attached. The DevOps engineer has modified the user data in the CloudFormation template to install a new version of the application. The engineer has also applied the stack update. However, the application was not updated on the running EC2 instances. The engineer needs to ensure that the changes to the application are installed on the running EC2 instances. Which combination of steps will meet these requirements? (Choose two.)
Options
- AConfigure the user data content to use the Multipurpose Internet Mail Extensions (MIME)
- BRefactor the user data commands to use the cfn-init helper script. Update the user data to install
- CConfigure an EC2 launch template for the EC2 instances. Create a new EC2 Auto Scaling group.
- DRefactor the user data commands to use an AWS Systems Manager document (SSM document).
- ERefactor the user data command to use an AWS Systems Manager document (SSM document).
How the community answered
(64 responses)- A8% (5)
- B56% (36)
- C13% (8)
- E23% (15)
Explanation
Option B: cfn-init is a powerful tool for managing configuration on EC2 instances. By using cfn- init, the DevOps engineer can ensure that the new application version is installed regardless of the current state of the instances. cfn-hup helps keep cfn-init updated with the latest configuration Option D: SSM documents provide a centralized and reusable way to manage configurations. By using Run Command, the engineer can trigger the application update on all instances directly from the template. This approach allows for easier management and updates in the future.
Topics
Community Discussion
No community discussion yet for this question.