Courseiva
SecuritymediumMultiple ChoiceObjective-mapped

DVA-C02 Security Practice Question

A company stores sensitive documents in an Amazon S3 bucket. The security team requires that all objects uploaded must be encrypted at rest using a specific customer-managed AWS KMS key (key-id: 1234-5678). The developer must enforce this by denying any PutObject request that does not use the correct key. Which S3 bucket policy condition should be used?

⚠ Common exam trap

Many candidates confuse `s3:x-amz-server-side-encryption` (which only checks if SSE-KMS is enabled) with `s3:x-amz-server-side-encryption-aws-kms-key-id` (which checks the specific key ID), leading them to pick Option A, which does not enforce the required customer-managed key.

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

s3:x-amz-server-side-encryption-aws-kms-key-id with value 'arn:aws:kms:us-east-1:123456789012:key/1234-5678'

The condition key `s3:x-amz-server-side-encryption-aws-kms-key-id` allows you to enforce that a specific customer-managed AWS KMS key (identified by its full ARN) is used for server-side encryption. By denying PutObject requests that do not match this key ID, the security team ensures all uploaded objects are encrypted at rest with the required KMS key.

Answer analysis

Option-by-option breakdown

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

  • s3:x-amz-server-side-encryption with value 'aws:kms'

    Why it's wrong here

    This condition `s3:x-amz-server-side-encryption` only validates that server-side encryption with AWS KMS (SSE-KMS) is being used for the object upload. While it ensures encryption via KMS, it does not provide any mechanism to specify or enforce the use of a particular customer-managed key (CMK). Therefore, any KMS key, including the default S3-managed KMS key or another CMK accessible to the uploader, would satisfy this condition, failing to meet the requirement for a *specific* key.

  • s3:x-amz-server-side-encryption-aws-kms-key-id with value 'arn:aws:kms:us-east-1:123456789012:key/1234-5678'

    Why this is correct

    The `s3:x-amz-server-side-encryption-aws-kms-key-id` condition directly enforces the use of a specific AWS KMS key by comparing its ARN against the value provided in the S3 PUT object request header. This precise condition ensures that only objects encrypted with the designated customer-managed key (CMK) are successfully uploaded to the bucket. It provides the granular control necessary to meet strict compliance requirements for sensitive data, ensuring data at rest is secured with an auditable, pre-approved key.

  • s3:x-amz-acl with value 'bucket-owner-full-control'

    Why it's wrong here

    The `s3:x-amz-acl` condition key is used to control the Access Control List (ACL) settings applied to an object during an S3 upload operation. For instance, setting it to 'bucket-owner-full-control' ensures that the bucket owner gains full control over objects uploaded by other AWS accounts. However, this condition is entirely unrelated to server-side encryption methods or the specific KMS key used for data protection, focusing solely on object ownership and permissions.

  • aws:SourceArn with value the bucket ARN

    Why it's wrong here

    The `aws:SourceArn` condition key is primarily utilized in resource-based policies to mitigate the confused deputy security problem by restricting which AWS services or resources can invoke actions on the policy's target resource. It ensures that requests originate from an expected source, such as a specific Lambda function or S3 bucket. This condition does not, however, govern or enforce any aspects of server-side encryption, including the type of encryption or the specific KMS key employed for data at rest.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.