Resolving SageMaker Training Access Denied Errors
Exhibit
Refer to the exhibit.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject"
],
"Resource": "arn:aws:s3:::my-bucket/*"
},
{
"Effect": "Allow",
"Action": [
"sagemaker:CreateTrainingJob",
"sagemaker:CreateModel",
"sagemaker:CreateEndpointConfig",
"sagemaker:CreateEndpoint"
],
"Resource": "*"
}
]
}A data scientist is using an IAM role with the policy shown in the exhibit to train a model in SageMaker. The training job fails with a permissions error. What is the missing permission?
Quick Answer
The answer is `iam:PassRole`. This permission is missing because when SageMaker launches a training job, it must be allowed to pass the IAM role you specify in the job configuration to the underlying compute resources; without `iam:PassRole`, SageMaker cannot assume that role to access S3 buckets or other services, which directly causes the access denied error. On the AWS Certified Machine Learning Specialty MLS-C01 exam, this concept frequently appears in scenario-based questions where a training job fails despite the role having full S3 access—the trap is that candidates focus on data permissions instead of the service’s ability to assume the role. Remember that SageMaker itself is the actor that needs permission to pass, not just use, the role. A simple memory tip: “Pass the role to pass the exam”—if SageMaker can’t pass the role, it can’t proceed.
⚠ Common exam trap
The trap here is that candidates often focus on S3 or SageMaker-specific actions (like `s3:GetObject` or `sagemaker:CreateTrainingJob`) and overlook the prerequisite `iam:PassRole` permission, which is required for SageMaker to assume the role on behalf of the user.
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
✓
iam:PassRole
The training job fails because SageMaker needs to assume the IAM role specified in the training job configuration to access resources like S3 buckets. The `iam:PassRole` permission is required to allow the SageMaker service to pass that role to the training job. Without it, SageMaker cannot assume the role and thus cannot perform actions such as reading training data from S3.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
sagemaker:InvokeEndpoint
Why it's wrong here
InvokeEndpoint is for inference, not training.
- ✗
sagemaker:DescribeTrainingJob
Why it's wrong here
DescribeTrainingJob is for monitoring, not required for creation.
- ✗
s3:ListBucket
Why it's wrong here
GetObject is sufficient for reading training data.
- ✓
iam:PassRole
Why this is correct
SageMaker requires iam:PassRole to use the execution role.
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
This MLS-C01 question is part of Courseiva's 1,672-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
2 more ways this is tested on MLS-C01
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. Refer to the exhibit. A data scientist wants to use SageMaker to train a model using data stored in 'my-bucket'. The training job fails with an access denied error. What is the MOST likely cause?
hard- A.The bucket uses AWS KMS key encryption instead of AES256
- B.The bucket name in the policy does not match the actual bucket name
- ✓ C.The training job is not requesting server-side encryption with AES256
- D.The bucket is publicly accessible but the IAM role lacks permissions
Why C: SageMaker training jobs require server-side encryption with AES256 when the S3 bucket uses default encryption with AES256. If the training job does not explicitly request SSE-S3 (AES256) in its S3 data source configuration, the S3 service denies access, resulting in an 'access denied' error even if the IAM role has full S3 permissions.
Variation 2. Refer to the exhibit. A data scientist is trying to run a SageMaker training job using a script that reads data from the S3 bucket 'my-bucket' and writes the model artifact to the same bucket. The training job fails with an access denied error. What is the likely cause?
medium- ✓ A.The IAM role does not have permission to write to the S3 bucket for the model artifact
- B.The IAM role does not have sagemaker:CreateModel permission
- C.The IAM role does not have s3:ListBucket permission
- D.The IAM role does not have ec2:DescribeInstances permission
Why A: The training job fails with an access denied error because the IAM role used by SageMaker lacks the s3:PutObject permission (or equivalent write access) for the S3 bucket 'my-bucket'. While the script reads data from the bucket, writing the model artifact requires explicit write permissions on the same bucket. Without this, SageMaker cannot upload the model artifact, causing the job to fail.
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.