Q71 — AWS DOP-C02 Ch.1
Question 71 of 100 | ← Chapter 1
A company runs an application on Amazon EC2 instances and uses AWS CodePipeline to deploy it across multiple AWS Regions. The pipeline configures one stage per Region, each containing an AWS CloudFormation action for auto-scaling group creation. After deploying to a Region, the company requires confirmation that the application is healthy before proceeding to the next Region. Amazon Route 53 records are configured per Region, and the DevOps engineer created Route 53 health checks based on Amazon CloudWatch alarms for each Region’s deployed application.
- A. Create an AWS Step Functions workflow to check the status of CloudWatch alarms. Configure the workflow to fail if the alarm is in ALARM state. Add a new stage between each Region’s deployment stage in the pipeline and include an action invoking the Step Functions workflow. ✓
- B. Configure an AWS CodeDeploy application to deploy a CloudFormation template with automatic rollback. Configure CloudWatch alarms as CodeDeploy instance health checks. Remove CloudFormation actions from the pipeline and add CodeDeploy actions per Region.
- C. Create a new pipeline stage for each Region where the application is deployed. Configure a CloudWatch alarm action in the new stage to check alarm status and exit with error if the alarm is in ALARM state.
- D. Configure the CloudWatch agent on EC2 instances to report application status to Route 53 health checks. Create a new pipeline stage per Region. Configure a CloudWatch alarm action to exit with error if the alarm is in ALARM state.
Correct Answer: A. Create an AWS Step Functions workflow to check the status of CloudWatch alarms. Configure the workflow to fail if the alarm is in ALARM state. Add a new stage between each Region’s deployment stage in the pipeline and include an action invoking the Step Functions workflow.
Explanation
CodePipeline requires explicit wait-and-validate logic between stages; it lacks native CloudWatch alarm polling. Option A correctly uses Step Functions to orchestrate synchronous validation: the workflow polls CloudWatch alarms and fails if unhealthy, halting pipeline progression. This aligns with the requirement to confirm health before advancing. Option C incorrectly assumes CodePipeline supports direct CloudWatch alarm actions (it does not). Option D conflates Route 53 health checks (DNS-level) with CloudWatch alarms (metrics-level) and misconfigures agent reporting. Option B replaces CloudFormation with CodeDeploy unnecessarily. Thus, Option A is correct.