nerdexam
AmazonAmazon

DOP-C02 · Question #127

DOP-C02 Question #127: Real Exam Question with Answer & Explanation

Sign in or unlock DOP-C02 to reveal the answer and full explanation for question #127. The question stem and answer options stay visible for context.

Submitted by miguelv· Mar 6, 2026Configuration Management and Infrastructure as Code

Question

A DevOps engineer has implemented a CI/CD pipeline to deploy an AWS CloudFormation template that provisions a web application. The web application consists of an Application Load Balancer (ALB), a target group, a launch template that uses an Amazon Linux 2 AMI, an Auto Scaling group of Amazon EC2 instances, a security group, and an Amazon RDS for MySQL database. The launch template includes user data that specifies a script to install and start the application. The initial deployment of the application was successful. The DevOps engineer made changes to update the version of the application with the user data. The CI/CD pipeline has deployed a new version of the template. However, the health checks on the ALB are now failing. The health checks have marked all targets as unhealthy. During investigation, the DevOps engineer notices that the CloudFormation stack has a status of UPDATE_COMPLETE. However, when the DevOps engineer connects to one of the EC2 instances and checks /var/log/messages, the DevOps engineer notices that the Apache web server failed to start successfully because of a configuration error. How can the DevOps engineer ensure that the CloudFormation deployment will fail if the user data fails to successfully finish running?

Options

  • AUse the cfn-signal helper script to signal success or failure to CloudFormation. Use the
  • BCreate an Amazon CloudWatch alarm for the UnhealthyHostCount metric. Include an appropriate
  • CCreate a lifecycle hook on the Auto Scaling group by using the AWS::AutoScaling::LifecycleHook
  • DUse the Amazon CloudWatch agent to stream the cloud-init logs. Create a subscription filter that

Unlock DOP-C02 to see the answer

You've previewed enough free DOP-C02 questions. Unlock DOP-C02 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#CloudFormation#cfn-signal#Auto Scaling Group#Deployment Troubleshooting
Full DOP-C02 PracticeBrowse All DOP-C02 Questions