Exam DOP-C02 All QuestionsBrowse all questions from this exam
Question 140

A company has an application that runs on Amazon EC2 instances. The company uses an AWS CodePipeline pipeline to deploy the application into multiple AWS Regions. The pipeline is configured with a stage for each Region. Each stage contains an AWS CloudFormation action for each Region.

When the pipeline deploys the application to a Region, the company wants to confirm that the application is in a healthy state before the pipeline moves on to the next Region. Amazon Route 53 record sets are configured for the application in each Region. A DevOps engineer creates a Route 53 health check that is based on an Amazon CloudWatch alarm for each Region where the application is deployed.

What should the DevOps engineer do next to meet the requirements?

    Correct Answer: A

    To ensure the application is in a healthy state before moving on to the next region during the deployment pipeline, the best approach is to use AWS Step Functions. A specific Step Functions workflow can be created to check the state of the CloudWatch alarm. If the alarm is in the ALARM state, the workflow can be configured to exit with an error, effectively halting the pipeline. By adding a new stage in the pipeline between each region deployment stage, and including an action to invoke the Step Functions workflow, it ensures that the health of the application is validated before proceeding with further deployments. This method provides a clear, integrated mechanism within AWS CodePipeline to manage health checks across multiple regions.

Discussion
a54b16fOption: A

Exact scenario for Step usage: different routing options based on choices

zolthar_zOption: A

A: https://dev.to/aws-builders/dynamic-build-orchestration-using-codepipeline-codebuild-and-step-functions-2kpa

zain1258Option: A

A is correct answer

thanhnv142

A is correct: <confirm that the application is in a healthy state before the pipeline moves on to the next Region.> means we need a new stage B and C: no mention of creating a new stage D: irrelevant

TheAWSRhinoOption: A

A - 'If the state machine execution reaches a terminal status of FAILED, TIMED_OUT, or ABORTED, the action execution fails.' https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-StepFunctions.html Can't be D because you can't update a Route53 healhcheck via the Cloudwatch agent

zijoOption: D

D seems to be simple solution for me The CloudWatch agent on EC2 instances can be configured to report the application status, and this information can then be used by Route 53 health checks. Create Route 53 health checks that are based on the CloudWatch alarms. When you create a health check in Route 53, you can specify that the health check should be based on the state of a CloudWatch alarm. Route 53 health checks can be configured to treat the CloudWatch alarm state as Healthy or Unhealthy.

govindrk

D is correct - https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/monitoring-cloudwatch.html