Question 325 of 724
DVA-C02 Security Practice Question
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?
⚠ Common exam trap
It's easy for candidates to 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.
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.
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.
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
A bucket policy controls access to S3 objects themselves, determining who can perform actions like s3:GetObject or s3:PutObject. While it can restrict *who* can retrieve an encrypted object from S3, it does not govern the permissions required to *decrypt* that object using AWS KMS. An authorized principal could still retrieve the encrypted data, but without explicit kms:Decrypt permission, they would receive ciphertext, not plaintext. Therefore, this policy alone does not enforce decryption restrictions.
- ✓
Add a key policy that allows the IAM role to perform kms:Decrypt and denies all other principals.
Why this is correct
A KMS key policy is the primary and mandatory control mechanism for defining who can use a Customer Master Key (CMK) for cryptographic operations, including kms:Decrypt. By explicitly allowing kms:Decrypt for the specified IAM role and implementing a default deny for all other principals, this policy directly enforces that only the designated role possesses the necessary permission to decrypt data encrypted with this specific KMS key. This ensures granular control over the sensitive data's accessibility in plaintext form.
- ✗
Configure the S3 bucket with default encryption using the KMS key.
Why it's wrong here
Configuring S3 default encryption with a KMS key ensures that all new objects uploaded to the bucket are automatically encrypted at rest using that specified key. While this is a crucial security measure for data protection, it solely addresses the encryption aspect, guaranteeing data is stored in an encrypted state. It does not, however, define or restrict *who* is authorized to perform the kms:Decrypt operation on the data encrypted by that key. Without explicit decryption permissions, any principal with S3 GetObject access could retrieve the encrypted object but would be unable to read its contents.
- ✗
Create an IAM policy that grants kms:Decrypt only to the specific role.
Why it's wrong here
An IAM policy grants permissions to an IAM principal (like a role) within an AWS account. While granting kms:Decrypt in an IAM policy is necessary, it is not sufficient on its own for accessing a KMS key. AWS KMS employs a two-layer authorization model: both the IAM policy *and* the KMS key policy must explicitly permit the action. If the KMS key policy does not also allow the IAM role to perform kms:Decrypt, the request will be denied, regardless of what the IAM policy states.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
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 →
Last reviewed: Jun 11, 2026
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.
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.
Sign in to join the discussion.