Question 325 of 1,616
SecuritymediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is to add a KMS key policy that allows the specific IAM role to perform kms:Decrypt and denies all other principals. This is correct because KMS key policies are the authoritative access control for a customer managed key; they directly govern who can use the key for cryptographic operations like decryption, overriding any broader IAM or S3 bucket policies. On the AWS Certified Developer Associate DVA-C02 exam, this scenario tests your understanding that key policies are evaluated first and can explicitly deny the root account, making them the most secure way to restrict S3 decryption to a single role. A common trap is assuming an IAM policy alone is sufficient, but without a matching key policy, the root account or other roles could still decrypt. Memory tip: think of the key policy as the "bouncer at the door"—it decides who gets the key, regardless of what the party invitation (IAM policy) says.

DVA-C02 Security Practice Question

This DVA-C02 practice question tests your understanding of security. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A company has an S3 bucket that stores sensitive data. The data is encrypted at rest using an AWS KMS customer managed key (CMK). The security team wants to ensure that only a specific IAM role in the same account can decrypt the objects. Which configuration should the developer implement?

Question 1mediummultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Add a key policy that allows the IAM role to perform kms:Decrypt and denies all other principals.

Option B is correct because KMS key policies directly control who can use the key for cryptographic operations like kms:Decrypt. By explicitly allowing only the specific IAM role and denying all other principals (including the root account), the key policy ensures that only that role can decrypt the S3 objects, regardless of any other IAM or bucket policies. This is the most secure and direct way to restrict decryption at the key level.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Add a bucket policy that denies s3:GetObject unless the request uses a specific IAM role.

    Why it's wrong here

    Bucket policies control S3 access, not KMS decryption permissions.

  • Add a key policy that allows the IAM role to perform kms:Decrypt and denies all other principals.

    Why this is correct

    KMS access is controlled via key policies; this grants decryption only to the specified role.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Configure the S3 bucket with default encryption using the KMS key.

    Why it's wrong here

    Default encryption ensures encryption but does not restrict which principals can decrypt.

  • Create an IAM policy that grants kms:Decrypt only to the specific role.

    Why it's wrong here

    Without a key policy allowing IAM access, the IAM policy alone is not sufficient.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often assume IAM policies alone can grant decryption access, but KMS key policies are the authoritative gatekeeper for key usage, and without an explicit Allow in the key policy, even an IAM policy with kms:Decrypt will fail.

Detailed technical explanation

How to think about this question

KMS key policies use a resource-based access control model where the key policy is evaluated first, and if it denies access, the request is denied regardless of IAM policies. The key policy can include a Deny statement with a condition like 'Principal': '*' and 'Effect': 'Deny' for kms:Decrypt, with an explicit Allow for the specific role ARN. This ensures that even the AWS account root user cannot decrypt unless explicitly allowed, which is a common requirement for sensitive data compliance (e.g., PCI DSS, HIPAA).

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related DVA-C02 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free DVA-C02 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this DVA-C02 question test?

Security — This question tests Security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Add a key policy that allows the IAM role to perform kms:Decrypt and denies all other principals. — Option B is correct because KMS key policies directly control who can use the key for cryptographic operations like kms:Decrypt. By explicitly allowing only the specific IAM role and denying all other principals (including the root account), the key policy ensures that only that role can decrypt the S3 objects, regardless of any other IAM or bucket policies. This is the most secure and direct way to restrict decryption at the key level.

What should I do if I get this DVA-C02 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More DVA-C02 practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.