How to Enforce HTTPS for S3 GetObject Requests Using Bucket Policy
Exhibit
Refer to the exhibit. An IAM policy attached to an S3 bucket:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example-bucket/*",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
}
}
]
}Refer to the exhibit. A security engineer applied the bucket policy shown. What is the effect of this policy?
Quick Answer
The effect of this policy comes down to reading the Deny statement precisely: it applies specifically to the s3:GetObject action and is conditioned on aws:SecureTransport being false, the flag AWS sets when a request arrives over plain HTTP rather than HTTPS. Because the Deny is scoped narrowly to GetObject and to the SecureTransport condition, it only blocks read requests made without TLS; it says nothing about PutObject, so uploads are unaffected regardless of protocol, and it says nothing about source IP address, so GetObject requests over HTTPS succeed no matter where they originate. The habit worth building is reading every Deny statement as a precise intersection of three things: the action it names, the condition it evaluates, and what is left untouched because it was never mentioned. It's easy to over-read a security policy and assume it does more than it says, for example assuming a policy enforcing encryption in transit also restricts write access or filters by IP, when it only does exactly what its Action and Condition blocks specify. Whenever a bucket-policy question asks you to determine the effect of a policy, resist imagining additional protections a security-conscious engineer might have intended, and work strictly from what the Action, Effect, and Condition keys actually say, since exam questions frequently test whether you notice a policy's narrow, literal scope rather than its likely intent.
⚠ Common exam trap
The trap here is that candidates overlook the `Null` condition on `aws:SecureTransport` and assume the `NotIpAddress` condition alone denies all requests from outside the IP range, missing that the policy only triggers when the request is over HTTP.
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
✓
Only GetObject requests that use HTTP are denied.
The bucket policy includes a Deny statement for s3:GetObject requests that are not using HTTPS. The condition `aws:SecureTransport` is set to false, meaning the request is over HTTP. Therefore, any GetObject request made over HTTP is denied. PutObject requests are not affected, and GetObject requests over HTTPS are allowed regardless of IP address.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
All PutObject requests are denied.
Why it's wrong here
PutObject requests are not denied by this policy; the Deny statement only applies to GetObject.
- ✓
Only GetObject requests that use HTTP are denied.
Why this is correct
Correct. The policy denies GetObject requests when aws:SecureTransport is false (HTTP).
- ✗
Only GetObject requests from specific IP ranges are denied.
Why it's wrong here
The policy includes a NotIpAddress condition, but it only applies when aws:SecureTransport is false. It does not deny all GetObject requests from specific IPs; it denies only those over HTTP.
- ✗
All GetObject requests to the bucket are denied.
Why it's wrong here
The policy does not deny all GetObject requests; it only denies those over HTTP. HTTPS requests are allowed.
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 — 376 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 →
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. A security engineer applies this bucket policy to an S3 bucket. A user without HTTPS tries to download an object. What is the outcome?
hard- ✓ A.The request is denied because the condition matches
- B.The request fails because the condition does not match
- C.The request succeeds because the policy has a Deny effect
- D.The request succeeds because the resource is not specific enough
Why A: The bucket policy includes a condition that denies requests when `aws:SecureTransport` is `false`. Since the user attempts to download an object without HTTPS, the condition matches, and the explicit Deny effect overrides any Allow. Therefore, the request is denied.
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.