Question 259 of 977
hardMultiple ChoiceObjective-mapped
CV0-004 Practice Question: Refer to the exhibit
Exhibit
IAM Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::example-bucket/*",
"Condition": {
"StringEquals": {
"s3:x-amz-server-side-encryption": "AES256"
}
}
}
]
}
Bucket Policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Principal": "*",
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::example-bucket/*",
"Condition": {
"StringNotEquals": {
"s3:x-amz-server-side-encryption": "aws:kms"
}
}
}
]
}Refer to the exhibit. A developer is trying to upload an object to S3 bucket 'example-bucket' using the IAM policy shown. The upload fails with an AccessDenied error. Which of the following is the MOST likely reason?
⚠ Common exam trap
CompTIA Cloud+ often tests the concept that an explicit deny in a resource-based policy (like an S3 bucket policy) overrides any allow from an identity-based policy (like an IAM policy), leading candidates to incorrectly focus on missing permissions or encryption headers instead of the deny override.
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 bucket policy has a deny that overrides this IAM policy.
The IAM policy grants the s3:PutObject action, but an explicit deny in the bucket policy overrides any allow from an IAM policy. Since AWS evaluates all policies (identity-based and resource-based) and an explicit deny always takes precedence, the upload fails with AccessDenied even though the IAM policy appears sufficient.
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 IAM policy requires server-side encryption with AES256, but the upload request did not specify that header.
Why it's wrong here
Even if the header is missing, the bucket policy would still deny, but the most direct cause is the conflicting bucket policy.
- ✓
The bucket policy has a deny that overrides this IAM policy.
Why this is correct
The bucket policy denies PutObject unless encryption is aws:kms, which conflicts with the IAM policy's AES256 requirement, resulting in a deny.
- ✗
The developer's user is not in the same account as the bucket.
Why it's wrong here
Cross-account access can be allowed with proper policies; the exhibit does not indicate account mismatch.
- ✗
The IAM policy does not grant the s3:ListBucket permission.
Why it's wrong here
ListBucket is not required for uploads; the error is AccessDenied on PutObject, not ListBucket.
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 |
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jul 4, 2026
This CV0-004 practice question is part of Courseiva's free CompTIA 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 CV0-004 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.