S3 Bucket Policy to Enforce SSE-KMS Encryption
Exhibit
Refer to the exhibit.
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyIncorrectEncryptionHeader",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::example-bucket/*",
"Condition": {
"StringNotEquals": {
"s3:x-amz-server-side-encryption": "aws:kms"
}
}
},
{
"Sid": "DenyUnencryptedObjectUploads",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::example-bucket/*",
"Condition": {
"Null": {
"s3:x-amz-server-side-encryption": "true"
}
}
}
]
}
```Refer to the exhibit. An administrator applies this bucket policy to an S3 bucket. Which of the following statements describes the effect of this policy?
Quick Answer
The correct answer is that the policy denies all PutObject requests that do not specify SSE-KMS. This works because the bucket policy contains two conditional deny statements: the first blocks uploads where the `x-amz-server-side-encryption` header is present but set to anything other than `aws:kms`, and the second blocks uploads where that encryption header is entirely absent or null. Together, they enforce that every PutObject must include the header with the exact value `aws:kms`, effectively mandating SSE-KMS encryption for all objects written to the bucket. On the AWS Certified Security Specialty SCS-C02 exam, this scenario tests your ability to interpret S3 bucket policy conditions that combine a specific-value check with a null check, a common pattern for enforcing encryption requirements. A frequent trap is assuming that a single condition is enough, but the exam expects you to recognize that both conditions are needed to cover cases where the header is missing versus present but wrong. Memory tip: think of it as a double lock—one denies the wrong key, the other denies no key at all.
⚠ Common exam trap
The trap is that candidates might misread the policy and think the first statement alone denies all non-KMS encryption, but the second statement is needed to also deny requests with no encryption header at all.
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
✓
The policy denies all PutObject requests that do not specify SSE-KMS.
The bucket policy contains two Deny statements: the first denies PutObject when the `x-amz-server-side-encryption` header is not `aws:kms`, and the second denies PutObject when the header is absent (null). Together, they ensure that any upload without SSE-KMS is denied, effectively requiring SSE-KMS for all PutObject requests. Options B, C, and D are incorrect because the policy does not allow any unencrypted uploads or uploads with SSE-S3; it only allows uploads with SSE-KMS.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The policy denies all PutObject requests that do not specify SSE-KMS.
Why this is correct
Correct. The policy denies PutObject when the encryption header is not `aws:kms` or is absent, effectively requiring SSE-KMS.
- ✗
The policy allows uploads without encryption but denies uploads with SSE-KMS.
Why it's wrong here
Incorrect. The policy denies uploads without encryption (header absent) and denies uploads with any encryption other than SSE-KMS. It does not allow unencrypted uploads.
- ✗
The policy allows unencrypted uploads but denies uploads with SSE-KMS.
Why it's wrong here
Incorrect. The policy denies unencrypted uploads and denies uploads with SSE-KMS? Actually, it denies all non-KMS encryption, so it does not allow unencrypted uploads.
- ✗
The policy allows uploads with SSE-S3 but denies uploads with SSE-KMS.
Why it's wrong here
Incorrect. The policy denies uploads with SSE-S3 (since SSE-S3 uses `AES256`, not `aws:kms`) and also denies uploads with SSE-KMS? Wait, it only denies non-KMS encryption, so it allows SSE-KMS. The description is reversed.
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 376 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 →
Same concept, more angles
1 more way this is tested on SCS-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Refer to the exhibit. An S3 bucket policy is shown. An administrator uploads an object to 'example-bucket' without specifying any encryption header. What is the outcome?
medium- ✓ A.The upload fails with an Access Denied error
- B.The object is uploaded and encrypted with the bucket's default encryption settings
- C.The object is encrypted with SSE-KMS automatically
- D.The object is uploaded without encryption
Why A: The bucket policy denies PutObject requests unless the 'x-amz-server-side-encryption' header equals 'AES256'. Since no encryption header was specified, the condition evaluates to true, and the request is denied with an Access Denied error. Options B, C, and D are incorrect because the upload fails due to the policy.
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.