
Answer-first summary for fast verification
Answer: Create an AWS Step Functions workflow to monitor the CloudWatch alarm's state. Configure the Step Functions workflow to terminate with an error if the alarm is in the ALARM state. Introduce a new stage in the pipeline between each region's deployment stage, incorporating an action to trigger the Step Functions workflow.
The correct answer is A. Option A suggests creating an AWS Step Functions workflow to check the state of the CloudWatch alarm and configuring the workflow to exit with an error if the alarm is in the ALARM state. This step ensures that before the pipeline moves on to the next region, the application's health is verified. This aligns with the requirement to confirm the application's health in each region. Additionally, AWS documentation supports the use of Step Functions for complex orchestration within a CodePipeline, providing the necessary control to halt the pipeline if the application is not in a healthy state.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company deploys an application on Amazon EC2 instances across multiple AWS Regions using an AWS CodePipeline. Each deployment stage includes an AWS CloudFormation action. The company mandates that the application must be verified as healthy in each region before the pipeline advances to the next region. Route 53 record sets are established for the application in every region, and a Route 53 health check linked to a CloudWatch alarm is implemented for each region. What measures should the DevOps engineer implement to ensure the pipeline progresses to the next region only if the application is confirmed to be in a healthy state?
A
Create an AWS Step Functions workflow to monitor the CloudWatch alarm's state. Configure the Step Functions workflow to terminate with an error if the alarm is in the ALARM state. Introduce a new stage in the pipeline between each region's deployment stage, incorporating an action to trigger the Step Functions workflow.
B
Set up an AWS CodeDeploy application to deploy a CloudFormation template with automatic rollback. Integrate the CloudWatch alarm as the health check for the CodeDeploy application. Eliminate the CloudFormation actions from the pipeline. Add a CodeDeploy action to the pipeline stage for each region.
C
Establish a new pipeline stage for each region where the application is deployed. Configure a CloudWatch alarm action for this new stage to assess the CloudWatch alarm's state and terminate with an error if the alarm is in the ALARM state.
D
Configure the CloudWatch agent on the EC2 instances to send the application's status to the Route 53 health check. Introduce a new pipeline stage for each region where the application is deployed. Set up a CloudWatch alarm action to terminate with an error if the CloudWatch alarm is in the ALARM state.