MLS-C01 Data Engineering Practice Question
Exhibit
Refer to the exhibit.
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:GetObject", "s3:PutObject"],
"Resource": "arn:aws:s3:::my-bucket/*"
},
{
"Effect": "Allow",
"Action": ["glue:GetTable", "glue:GetDatabase"],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": ["athena:StartQueryExecution", "athena:GetQueryResults"],
"Resource": "*"
}
]
}
```An IAM policy attached to a SageMaker notebook role is shown. The data engineer tries to run an Athena query on a table in the 'my_database' Glue database. The query fails with an access denied error. What is the MOST likely cause?
⚠ Common exam trap
Candidates often assume the error is due to missing S3 or Glue permissions because the query accesses those services, but the actual missing permission is the Athena-specific action required to initiate the query execution.
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 policy does not allow athena:StartQueryExecution on the Athena workgroup.
The IAM policy does not include the `athena:StartQueryExecution` action on the Athena workgroup, which is required to submit a query. Even if the role has permissions for Glue and S3, Athena will deny the request if the workgroup-level permission to start queries is missing, resulting in an access denied error.
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 policy does not allow s3:PutObject on the query results location.
Why it's wrong here
This option suggests that the missing permission is s3:PutObject on the query results location. While Athena does need to write query results to S3, the immediate error here is caused by the lack of permission to execute the query itself, not by the S3 write. The policy might or might not include S3 permissions, but the missing athena:StartQueryExecution is the primary cause.
- ✗
The policy does not allow glue:GetTable on the specific database.
Why it's wrong here
This option suggests the missing permission is glue:GetTable on the specific database. While Glue permissions are necessary to access table metadata, the error message indicates that the query execution failed due to access denied on Athena, not Glue. Even if Glue permissions are present, Athena still requires the StartQueryExecution action.
- ✓
The policy does not allow athena:StartQueryExecution on the Athena workgroup.
Why this is correct
Correct because the IAM policy lacks the `athena:StartQueryExecution` action on the specific workgroup. This action is required to initiate an Athena query. Without it, any attempt to run a query will result in an access denied error, regardless of other permissions.
- ✗
The policy does not allow s3:ListBucket on the bucket.
Why it's wrong here
This option suggests the missing permission is s3:ListBucket on the bucket. Listing the bucket is not a prerequisite for running an Athena query. The error is directly related to Athena's execution permission, not S3 list operations.
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,672 original MLS-C01 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 MLS-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 MLS-C01 exam.