SDLC Automation

A central AWS CodePipeline pipeline must deploy through a least-privilege action role in a production account, using artifacts stored in the central account's S3 bucket and encrypted with a customer managed KMS key. Which configuration supports cross-account deployment and artifact access?

Show the answer

Correct answerD. Trust the pipeline role in the production action role; authorize role assumption, S3 artifact reads, and KMS decryption in the applicable IAM, bucket, and key policies.

AWhy not this: Cross-account S3 access also requires permission from the bucket owner, normally through the bucket policy.

BWhy not this: The cross-account action role must trust the pipeline's service role, not merely the CodePipeline service principal.

CWhy not this: An S3 bucket policy grants S3 access, not permission to decrypt with a KMS key.

DWhy this is right: Role assumption needs permission and trust; cross-account artifact reads and decryption need corresponding identity and resource permissions.

The pipeline role needs permission to assume the production role, whose trust policy must allow it. Cross-account artifact access also requires appropriate S3 and KMS permissions on both sides; an S3 bucket policy cannot grant KMS decryption.