DOP-C02 Security and Compliance Practice Question
Exhibit
Refer to the exhibit.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": "arn:aws:s3:::example-bucket/*",
"Condition": {
"Bool": {
"aws:SecureTransport": "false"
}
}
}
]
}Refer to the exhibit. The S3 bucket policy is applied to a bucket. An application attempts to upload an object to the bucket using HTTP (not HTTPS). What will happen?
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 upload fails because the condition matches HTTP requests
The bucket policy includes an explicit deny for all S3 actions when aws:SecureTransport is false (i.e., HTTP). This deny overrides any allow policies, so the upload fails. Option A is correct because the condition matches HTTP requests. Option B is incorrect because the explicit deny overrides any allow. Option C is incorrect because the deny is explicit, so the condition is evaluated. Option D is incorrect because the policy only denies HTTP, not HTTPS.
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 upload fails because the condition matches HTTP requests
Why this is correct
The upload fails because the S3 bucket policy contains an explicit Deny statement whose condition key `aws:SecureTransport` evaluates to `false` for any HTTP request. Since the request was made over HTTP rather than HTTPS, the condition is satisfied and S3 returns 403 Forbidden, regardless of any IAM permissions that would otherwise permit the PutObject action. An explicit deny always takes precedence over any allow.
- ✗
The upload succeeds if the bucket also has an allow policy for the user
Why it's wrong here
Adding an Allow statement for the user to the bucket policy cannot make an HTTP upload succeed when an explicit Deny with `SecureTransport=false` matches the request. AWS IAM policy evaluation is determined by explicit deny taking precedence over all allow statements, so the request is denied even if the bucket policy grants `s3:PutObject` through another statement. The only way to succeed would be to remove or change the deny or switch to HTTPS.
- ✗
The upload succeeds because there is no explicit allow statement
Why it's wrong here
The absence of an explicit Allow in the bucket policy is not the reason the upload fails, because the user could have an implicit allow from an IAM policy such as `s3:PutObject`. However, even with an implicit allow, the explicit Deny condition in the bucket policy overrides it, causing S3 to deny the HTTP request. Thus, a successful upload requires both a positive authorization decision and the absence of an applicable explicit deny.
- ✗
The upload fails because the bucket policy does not allow any access
Why it's wrong here
This misidentifies the cause of the failure: the bucket policy does contain access statements, and more importantly the request is rejected because an explicit Deny applies, not simply because no Allow exists. If the policy merely lacked an Allow, the result would be an implicit deny leading to a 403 AccessDenied, but the presence of a matching explicit Deny means the condition key `aws:SecureTransport=false` is the trigger. The real reason is the conditional Deny matching HTTP, not a missing allow.
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,013 original DOP-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 DOP-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 DOP-C02 exam.