
AWS Certified DevOps Engineer - Professional
Get started today
Ultimate access to all questions.
A company uses AWS CodeBuild to build a container image using Docker commands and initially stores the image in an Amazon S3 bucket, which the CodeBuild project's IAM service role has access to. The DevOps engineer now needs to store the container images in an Amazon Elastic Container Registry (Amazon ECR) repository instead. The engineer creates a private ECR repository in the same AWS Region as the CodeBuild project, adjusts the IAM service role permissions for ECR access, and updates the docker build and docker push commands in the buildspec.yml file with the new repository information. Despite these changes, the CodeBuild job fails when attempting to access the ECR repository. What solution will successfully resolve the issue of failed access to the ECR repository?
A company uses AWS CodeBuild to build a container image using Docker commands and initially stores the image in an Amazon S3 bucket, which the CodeBuild project's IAM service role has access to. The DevOps engineer now needs to store the container images in an Amazon Elastic Container Registry (Amazon ECR) repository instead. The engineer creates a private ECR repository in the same AWS Region as the CodeBuild project, adjusts the IAM service role permissions for ECR access, and updates the docker build and docker push commands in the buildspec.yml file with the new repository information. Despite these changes, the CodeBuild job fails when attempting to access the ECR repository. What solution will successfully resolve the issue of failed access to the ECR repository?