SCS-C02 Infrastructure Security Practice Question
A company wants to restrict access to an Amazon S3 bucket so that only objects uploaded with server-side encryption using AWS KMS (SSE-KMS) are allowed. Which bucket policy condition key should be used?
⚠ Common exam trap
Candidates often confuse the generic encryption condition key with the specific KMS key ID condition key. For restricting to any SSE-KMS, use `s3:x-amz-server-side-encryption` with value `aws:kms`. To restrict to a specific KMS key, use `s3:x-amz-server-side-encryption-aws-kms-key-id`.
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
To enforce that all objects uploaded to an S3 bucket use SSE-KMS, you should use the bucket policy condition key `s3:x-amz-server-side-encryption` and set its value to `aws:kms`. This ensures the encryption header is `aws:kms` without requiring a specific KMS key. The key `s3:x-amz-server-side-encryption-aws-kms-key-id` is used only when you need to require a particular KMS key ARN.
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-customer-key
Why it's wrong here
The s3:x-amz-server-side-encryption-customer-key condition key is specifically for SSE-C, where the client supplies the encryption key in the request headers. It evaluates the base64-encoded customer-provided key, not an AWS KMS key identifier, so it cannot enforce or verify that an object was encrypted with a particular AWS KMS key. Since the requirement is to restrict access to objects encrypted with SSE-KMS using a specific KMS key, this condition is inapplicable and would not achieve the desired control.
- ✗
s3:x-amz-server-side-encryption-aws-kms-key-id
Why it's wrong here
The s3:x-amz-server-side-encryption-aws-kms-key-id condition key is the correct choice because it can be used in an S3 bucket policy to require that objects are encrypted with a specific AWS KMS key. This condition matches the KMS key ID or ARN used for SSE-KMS encryption, and if a request uses a different KMS key or does not use SSE-KMS at all, the condition fails and access is denied. It directly enforces the stated requirement of restricting access to objects encrypted with a particular KMS key.
- ✗
kms:EncryptionContext
Why it's wrong here
The kms:EncryptionContext condition key is designed for use in AWS KMS key policies and IAM policies that govern KMS cryptographic operations, not for S3 bucket policies. S3 bucket policies do not evaluate kms:EncryptionContext, and even if included, the condition would be ignored or cause the policy to be invalid because S3 does not expose that key in the policy evaluation context. To enforce encryption with a specific KMS key on S3 objects, you must use an S3-specific condition key such as s3:x-amz-server-side-encryption-aws-kms-key-id.
- ✓
s3:x-amz-server-side-encryption
Why this is correct
The s3:x-amz-server-side-encryption condition key only verifies that server-side encryption was requested or applied, typically checking the value such as AES256 or aws:kms, but it does not identify which AWS KMS key was used. This condition can ensure that objects are encrypted, but it cannot distinguish between different KMS keys, so it is insufficient for restricting access to objects encrypted with a specific KMS key. The requirement specifically calls for enforcing a particular KMS key, which requires a more granular condition key like s3:x-amz-server-side-encryption-aws-kms-key-id.
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 |
Go deeper
Related to this question
About these practice questions
One of 1,205 original SCS-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SCS-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 SCS-C02 exam.