DOP-C02 exam dumps

DOP-C02 practice question 242 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 242

Single answer

You are managing a CI/CD pipeline for a web application hosted on Amazon ECS using Fargate. The pipeline uses AWS CodePipeline with AWS CodeBuild for building and testing the application code. Recently, builds are failing intermittently due to 'RateExceededException' errors when trying to pull Docker images from Amazon Elastic Container Registry (ECR). What should you do to resolve this issue?

  1. A

    Increase the number of concurrent build projects in AWS CodeBuild.

  2. B

    Enable Amazon ECR lifecycle policies to reduce the number of stored images.

  3. C

    Configure the CodeBuild service role with the 'ecr:GetDownloadUrlForLayer' permission.

  4. D

    Configure a retry strategy in the buildspec file for pulling Docker images from Amazon ECR.

Show answer and explanation

Correct answer: D

Explanation

The 'RateExceededException' error occurs when the number of API requests to Amazon ECR exceeds the allowed rate. To mitigate this, you can implement a retry mechanism in the buildspec file of CodeBuild with exponential backoff. This approach ensures that transient rate limit errors are retried automatically, reducing build failures without increasing the overall API call rate.

  • A. Incorrect.

    Increasing the number of concurrent build projects could lead to more frequent API calls to Amazon ECR, worsening the 'RateExceededException' issue.

  • B. Incorrect.

    ECR lifecycle policies manage image retention and cleanup but do not address the rate limits for API calls.

  • C. Incorrect.

    The 'ecr:GetDownloadUrlForLayer' permission is required for pulling images but does not mitigate rate limit errors caused by high API call frequency.

  • D. Correct.

    Adding a retry strategy in the buildspec file helps handle transient errors like 'RateExceededException' by retrying failed API calls with exponential backoff.

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