A developer is implementing a cross-account continuous delivery pipeline in AWS CodePipeline. The pipeline is located in Account A and uses an Amazon S3 bucket in Account A to store artifacts. The deployment stage is configured to deploy resources into Account B using an AWS CloudFormation action. During pipeline execution, the CloudFormation action in Account B fails with an Access Denied error when trying to retrieve the input artifact zip file from the S3 bucket in Account A. The IAM role used for the CloudFormation deployment in Account B has been granted read permission to the S3 bucket in Account A, and the S3 bucket policy in Account A permits access from Account B's deployment role.
Which configuration change is required to resolve this deployment failure?
- AUpdate the IAM trust policy of the CodePipeline service role in Account A to allow the deployment IAM role in Account B to assume it, and configure AWS Systems Manager Parameter Store in Account B to cache the S3 credentials.
- Configure the S3 bucket in Account A to use a customer managed AWS KMS key instead of the default S3 managed key, grant the deployment IAM role in Account B permission to use the KMS key, and update the KMS key policy in Account A to trust Account B's deployment role.Cevap
- CStore the S3 bucket access credentials as a secret in AWS Secrets Manager in Account A, and configure the deployment IAM role in Account B to retrieve the secret by making a call to AWS Systems Manager Parameter Store.
- DConfigure the deployment IAM role in Account B to trust the CodePipeline service role in Account A by updating its trust policy, and configure the CodePipeline service role in Account A to assume the deployment IAM role in Account B without a KMS key.