Question 1,137 of 724
DVA-C02 Troubleshooting and Optimization Practice Question
A developer receives an AccessDenied error when trying to put an object into an S3 bucket using the AWS SDK. The IAM user has an attached policy that grants s3:PutObject on the bucket. What is the MOST likely cause of the error?
⚠ Common exam trap
Candidates often assume an IAM allow is sufficient, forgetting that S3 bucket policies can explicitly deny actions, and that explicit deny always wins over allow.
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 explicitly denies the action.
The most likely cause is that the bucket policy explicitly denies the s3:PutObject action. IAM policies grant permissions, but S3 bucket policies can override them with an explicit deny, which takes precedence over any allow. Since the IAM user already has an attached policy allowing s3:PutObject, the only way to get an AccessDenied error is if a bucket policy explicitly denies the action.
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 request is being throttled by S3.
Why it's wrong here
S3 throttling occurs when a high volume of requests exceeds the service's capacity for a specific prefix or bucket, typically resulting in an HTTP 503 SlowDown error. This error indicates a temporary service unavailability due to high load, prompting the client to retry with exponential backoff. An AccessDenied error (HTTP 403), however, specifically indicates an authorization failure, meaning the principal lacks the necessary permissions to perform the requested action, rather than a service capacity issue.
- ✗
The object key is too long.
Why it's wrong here
Amazon S3 object keys can be up to 1024 bytes long, encoded in UTF-8. Attempting to create an object with a key exceeding this limit would typically result in an InvalidArgument error or an HTTP 400 Bad Request, indicating an issue with the request parameters themselves. An AccessDenied error, conversely, signifies a lack of authorization for the principal to perform the action on the specified resource, not a malformed request due to key length.
- ✗
The AWS SDK version is outdated.
Why it's wrong here
An outdated AWS SDK version primarily leads to client-side issues such as incompatible API calls, missing methods for new features, or incorrect request serialization. These problems manifest as runtime errors within the application or malformed requests, often resulting in HTTP 400 Bad Request or internal client errors that prevent the request from being properly sent or interpreted. An AccessDenied error, conversely, is a server-side response indicating that the AWS service successfully received and understood the request but explicitly denied the principal permission to perform the action.
- ✓
The bucket policy explicitly denies the action.
Why this is correct
When evaluating permissions, AWS IAM follows a strict order of precedence where an explicit Deny statement always overrides any Allow statement. If a bucket policy contains an explicit Deny for a specific action or principal, that denial takes precedence over any Allow statement present in the requesting IAM user's or role's identity-based policy. This ensures that even if an identity policy grants permission, a resource-based policy can still block access, resulting in an AccessDenied error (HTTP 403).
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 DVA-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 DVA-C02 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.