DVA-C02 practice question · Deployment
A pipeline in CodePipeline in Account A has a CodeDeploy action that deploys into Account B.
A pipeline in CodePipeline in Account A has a CodeDeploy action that deploys into Account B. The team has created a role in Account B that trusts the CodePipeline service role in Account A, and has added an artifact bucket policy that grants Account B access. The pipeline still uses the default artifact encryption key, and the deployment fails because Account B cannot decrypt the artifacts. What should the team do?
- ACreate a customer managed KMS key in Account A, grant its use to Account B, and set it as the artifact store key
- BEdit the default AWS managed key's policy in Account A to allow Account B to call kms:Decrypt
- CCreate a customer managed KMS key in Account B and reference it in the pipeline by its alias
- DAttach a policy to the CodeDeploy service role in Account B that grants s3:GetObject on the artifact bucket
Show the answer and explanation
Correct answer: A) Create a customer managed KMS key in Account A, grant its use to Account B, and set it as the artifact store key
Cross-account pipeline actions need more than an assumable role and a bucket policy. The artifacts must be encrypted with a customer managed KMS key in the pipeline account that the target account is allowed to use.
Why each option is right or wrong
- A) Correct. The cross-account walkthrough requires a customer managed KMS key in the pipeline's Region, with usage permissions for the pipeline service role and Account B. The pipeline must then be edited to use that key instead of the default key.
- B) Incorrect. The default key is AWS managed, and you cannot change its key policy to grant another account access. The documentation says to switch the pipeline to a customer managed key.
- C) Incorrect. The walkthrough creates the key in the pipeline account (Account A). Aliases are recognized only in the account that created the key, so a cross-account action must use the key ID or key ARN.
- D) Incorrect. S3 access to the artifacts is already granted. The failure is a decryption problem, which needs KMS key permissions, not more S3 permissions.
- Exam domain
- Deployment · 24% of DVA-C02
- Question type
- Multiple choice (one answer)
Related DVA-C02 questions
- A CodeBuild project builds a container image from a CodeCommit repository and pushes it to Amazon ECR.Deployment
- A CodeBuild project needs to build a Docker image and push it to ECR as part of a CI pipeline running inside CodeBuild's…Deployment
- A web application on AWS Elastic Beanstalk puts video-transcoding jobs in an Amazon SQS queue.Deployment
- A frontend single-page application needs continuous deployment directly from a Git repository, including preview…Deployment
All 67 free DVA-C02 questions by domain · 15 sample questions on one page
Practise the full DVA-C02 exam
This question is one of a small free sample from the CertRidge DVA-C02 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.
Original question written from the official exam guide. Not affiliated with AWS; never copied from the real exam.
Worth reading: DVA-C02 cheat sheet, Lambda, DynamoDB, API Gateway, IAM and Cognito, messaging, CI/CD and X-Ray in tables, plus what DVA-C03 changes.