SCS-C02 Data Protection Practice Question
A company stores sensitive data in an Amazon S3 bucket. The security team wants to ensure that all objects are encrypted with SSE-KMS using a specific customer managed key, and that any attempt to upload an object without this encryption is denied. The bucket policy must enforce this. Which bucket policy statement should the security engineer use?
⚠ Common exam trap
The trap here is combining conditions with AND in a single deny statement, which fails to deny when only one condition is not met, leaving a gap in enforcement.
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
✓
Two deny statements for s3:PutObject: one where StringNotEquals on s3:x-amz-server-side-encryption is 'aws:kms', and another where StringNotEquals on s3:x-amz-server-side-encryption-aws-kms-key-id is the ARN of the specific KMS key.
To enforce a specific KMS key for SSE-KMS, the bucket policy must deny uploads that either do not use SSE-KMS or do not use the specified key. Using two separate deny statements with StringNotEquals conditions on s3:x-amz-server-side-encryption and s3:x-amz-server-side-encryption-aws-kms-key-id achieves this. A single statement with AND logic would not correctly deny when only one condition is violated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Two deny statements for s3:PutObject: one where StringNotEquals on s3:x-amz-server-side-encryption is 'aws:kms', and another where StringNotEquals on s3:x-amz-server-side-encryption-aws-kms-key-id is the ARN of the specific KMS key.
Why this is correct
Two separate deny statements ensure that an upload is denied if it lacks the correct encryption algorithm or if it uses a different KMS key. The first statement denies any upload not using aws:kms. The second denies any upload not using the specified key ARN. Together they enforce both requirements. This is the recommended approach in AWS documentation.
- ✗
A deny statement for s3:PutObject where the condition StringNotEquals on s3:x-amz-server-side-encryption is 'aws:kms' AND StringNotEquals on s3:x-amz-server-side-encryption-aws-kms-key-id is the ARN of the specific KMS key.
Why it's wrong here
Using AND in the condition means both must be not equal to be denied. If an upload uses the correct KMS key but a different algorithm, the first condition is true but the second is false, so the AND fails and the upload is allowed. This logic is flawed; the correct approach is to deny if either condition is not met, which requires separate statements or OR logic.
- ✗
A deny statement for s3:PutObject where the condition StringNotEquals on s3:x-amz-server-side-encryption-aws-kms-key-id is the ARN of the specific KMS key.
Why it's wrong here
This condition checks the KMS key ID but does not enforce that SSE-KMS is used. An upload with SSE-S3 or no encryption would not have the s3:x-amz-server-side-encryption-aws-kms-key-id header, causing the condition to evaluate to true (since the header is absent) and the deny would not apply. The policy must also require the encryption algorithm to be aws:kms.
- ✗
A deny statement for s3:PutObject where the condition StringNotEquals on s3:x-amz-server-side-encryption is 'aws:kms'.
Why it's wrong here
This condition checks only that the encryption algorithm is aws:kms, but does not verify the specific KMS key ID. An upload using a different KMS key would still be allowed. The requirement is to enforce a specific customer managed key, so the policy must also check s3:x-amz-server-side-encryption-aws-kms-key-id. This statement alone is insufficient.
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
Courseiva writes every SCS-C02 question from scratch — 1,205 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 →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint
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.