DOP-C02 exam dumps

DOP-C02 practice question 9 of 411

AWS Certified DevOps Engineer - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

DOP-C02 Question 9

Single answer

Your team is leveraging AWS CodePipeline to automate the deployment of a web application. The application uses an Amazon S3 bucket for static content and an Amazon ECS service for the backend. During the deployment, you want to ensure that the ECS service is updated only if the new version of the static content has been successfully uploaded to the S3 bucket. Which strategy would BEST meet this requirement?

  1. A

    Add a manual approval action between the S3 upload and ECS deployment stages.

  2. B

    Use an Amazon S3 source action with a trigger to automatically start the ECS deployment.

  3. C

    Include a dependency condition in CodePipeline to ensure the ECS deployment depends on the successful completion of the S3 upload stage.

  4. D

    Enable a CodePipeline retry on failure for the ECS deployment stage to handle any issues with the S3 upload.

Show answer and explanation

Correct answer: C

Explanation

In AWS CodePipeline, dependencies between stages can be enforced using dependency conditions. By making the ECS deployment stage dependent on the successful completion of the S3 upload stage, you ensure that the ECS service is only updated after the static content has been successfully uploaded, meeting the requirements for this scenario.

  • A. Incorrect.

    This adds a manual step that delays automation and does not inherently enforce a dependency between the S3 upload and ECS deployment stages.

  • B. Incorrect.

    While an S3 source action can trigger pipelines, it does not enforce logical dependencies between stages in the same pipeline.

  • C. Correct.

    This is the correct answer because CodePipeline supports defining dependencies between stages, ensuring that the ECS deployment only occurs after a successful S3 upload.

  • D. Incorrect.

    Retrying on failure is useful for transient issues but does not address the need to enforce the dependency between the S3 upload and ECS deployment stages.

Timed practice exam

Take a DOP-C02 practice test under exam conditions

75 questions in 180 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam