SDLC Automation

A CodeBuild role in account A must pull images directly from a private Amazon ECR repository in account B without assuming another role. Neither account has applicable explicit denies, and no permissions are configured yet. Which permissions should an administrator grant? (Choose three.)

Choose 3 answers

Show the answer

Correct answersC. Allow the CodeBuild role the ECR image-pull actions on the target repository in its identity policy.E. Allow the CodeBuild role ecr:GetAuthorizationToken on all resources in its identity policy.F. Allow the CodeBuild role the ECR image-pull actions in the target repository policy.

AWhy not this: ReplicateImage authorizes ECR replication rather than a build role's direct image pulls.

BWhy not this: PutImage supports pushing image manifests; it does not authorize pulling images.

CWhy this is right: The caller's account must authorize BatchGetImage, GetDownloadUrlForLayer, and BatchCheckLayerAvailability on the repository.

DWhy not this: ECR issues temporary authorization tokens; storing a password does not supply the missing cross-account permissions.

EWhy this is right: ECR authentication requires ecr:GetAuthorizationToken through an identity policy, with Resource set to an asterisk.

FWhy this is right: The repository's account must grant the external role the required image-pull actions through its repository policy.

Cross-account pulls require an authorization token and image-pull permissions in both the role's identity policy and the destination repository policy. Registry replication permissions authorize replication, not direct image pulls.