Why Does Glue Get Access Denied When Writing to S3?
This DEA-C01 practice question tests your understanding of data ingestion and transformation. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A data engineer has an IAM policy attached to an IAM role used by an AWS Glue job. The Glue job needs to read from S3 bucket 'data-bucket' and write to the same bucket. The job fails with an access denied error when trying to write to S3. What is the issue?
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The policy does not include s3:ListBucket permission, which Glue may need.
The correct answer is B because AWS Glue jobs require the `s3:ListBucket` permission on the bucket to perform operations like listing objects, even when reading and writing specific keys. Without this permission, the job fails with an access denied error when trying to write, as Glue internally uses `ListBucket` to verify bucket existence and access patterns. The policy attached to the IAM role likely includes `s3:GetObject` and `s3:PutObject` but omits the bucket-level `s3:ListBucket` action, which is necessary for the Glue job to interact with S3 successfully.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
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 Glue job cannot assume the IAM role because of trust policy.
Why it's wrong here
The exhibit does not mention trust issues.
✓
The policy does not include s3:ListBucket permission, which Glue may need.
Why this is correct
Glue may require ListBucket to navigate the bucket.
Related concept
Read the scenario before looking for a memorised answer.
✗
The resource ARN for S3 is missing the bucket-level permission.
Why it's wrong here
The resource includes /* which is correct for object operations.
✗
The actions for S3 are incorrect; s3:PutObject is not sufficient.
Why it's wrong here
s3:PutObject is the correct action for writing.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often assume only object-level permissions (GetObject, PutObject) are needed for read/write operations, overlooking the bucket-level ListBucket permission that AWS Glue implicitly requires for its internal operations.
Detailed technical explanation
How to think about this question
Under the hood, AWS Glue uses the S3 API to list objects in the bucket (via `ListObjectsV2`) before writing, to check for existing partitions or to validate the bucket path, which requires `s3:ListBucket` permission on the bucket resource. In real-world scenarios, this often catches engineers off guard when they grant only object-level actions (`s3:GetObject`, `s3:PutObject`) but forget the bucket-level `s3:ListBucket`, leading to access denied errors even though the write action itself is allowed. Additionally, Glue's internal catalog operations may also require `s3:GetBucketLocation` for cross-region access, but `s3:ListBucket` is the most common missing permission in this context.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.
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
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Data Ingestion and Transformation — This question tests Data Ingestion and Transformation — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The policy does not include s3:ListBucket permission, which Glue may need. — The correct answer is B because AWS Glue jobs require the `s3:ListBucket` permission on the bucket to perform operations like listing objects, even when reading and writing specific keys. Without this permission, the job fails with an access denied error when trying to write, as Glue internally uses `ListBucket` to verify bucket existence and access patterns. The policy attached to the IAM role likely includes `s3:GetObject` and `s3:PutObject` but omits the bucket-level `s3:ListBucket` action, which is necessary for the Glue job to interact with S3 successfully.
What should I do if I get this DEA-C01 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
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 →
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. An IAM policy is attached to an AWS Glue job. The job needs to read from and write to S3 buckets, and also trigger other Glue jobs. The job is failing with an AccessDenied error when trying to write to a bucket named 'example-bucket'. What is the MOST likely cause?
medium
A.The policy does not include s3:PutObject action.
✓ B.The bucket name in the resource ARN does not match the actual bucket name.
C.The policy uses a resource ARN with a wildcard, which is not allowed.
D.The policy does not allow Glue actions.
Why B: The AccessDenied error when writing to 'example-bucket' most likely occurs because the resource ARN in the IAM policy specifies a different bucket name, causing the S3 service to deny the s3:PutObject action. IAM policies require exact ARN matches for resource-based permissions, and a mismatch between the ARN bucket name and the actual bucket name will result in an implicit deny, even if the action is allowed.
Variation 2. Refer to the exhibit. A data engineer has attached this IAM policy to an AWS Glue job role. The Glue job fails when trying to write transformed data to an S3 bucket located in a different AWS account. What is the most likely reason?
medium
A.The policy does not allow lambda:InvokeAsync
B.The Glue job role does not have permissions to write to S3
✓ C.The policy does not grant s3:ListBucket, and the bucket policy may not allow cross-account access
D.The policy does not include kinesis:DescribeStream
Why C: Option C is correct because the IAM policy shown does not include the s3:ListBucket permission, which is required for the Glue job to list objects in the S3 bucket before writing. Additionally, cross-account access requires both the source account's IAM policy (this one) to grant write permissions and the target account's S3 bucket policy to explicitly allow the source account's role, which may not be configured. Without s3:ListBucket, the Glue job cannot verify the bucket's existence or structure, causing the write operation to fail.
Variation 3. A data engineer attached this IAM policy to a Lambda function used to transform data in S3. The function is unable to write output to the bucket. What is the most likely reason?
easy
A.The resource ARN is missing the bucket-level ARN.
B.The policy does not allow the s3:DeleteObject action.
✓ C.The policy does not allow the s3:ListBucket action on the bucket.
D.The policy does not allow the s3:PutObjectAcl action.
Why C: The policy allows GetObject and PutObject on objects, but not the s3:ListBucket action required to check existence or list objects. The function likely needs ListBucket to write or verify.
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.
This DEA-C01 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 DEA-C01 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.