Courseiva
Machine Learning Implementation and OperationshardMultiple ChoiceObjective-mapped

Cross-Account S3 Access for SageMaker Training

A company is using Amazon SageMaker to train a model on data stored in S3. The training job needs to access data from an S3 bucket in a different AWS account. The data owner has granted cross-account access via a bucket policy. However, the training job fails with an AccessDenied error. What is the MOST likely cause?

Quick Answer

The answer is the SageMaker execution role lacks the necessary permissions to access the S3 bucket. This is correct because SageMaker training jobs assume an IAM execution role to perform actions; even when a cross-account bucket policy grants access to the SageMaker service, the execution role itself must be explicitly listed as a principal in that bucket policy or have its own S3 permissions that the bucket policy allows. On the AWS Certified Machine Learning Specialty MLS-C01 exam, this question tests your understanding of how IAM roles and resource-based policies interact across accounts—a common trap is assuming a bucket policy alone is sufficient, but the execution role must be the trusted entity. Remember the memory tip: "Role first, bucket second"—the execution role must be authorized by the bucket policy before SageMaker can access the data.

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 SageMaker execution role does not have the necessary permissions to access the S3 bucket.

Even with a bucket policy granting cross-account access, the SageMaker execution role must have an IAM policy that allows s3:GetObject (and any other required actions) on the S3 bucket. Without these permissions, the training job will fail with AccessDenied. Option A is incorrect because SSE-KMS encryption would require KMS permissions, but the issue is specifically about access permissions, not encryption. Option C is incorrect because the data does not need to be public; cross-account access via bucket policy is sufficient. Option D is incorrect because cross-account access does not require a VPC endpoint.

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 data is encrypted with SSE-KMS and the SageMaker role lacks KMS permissions.

    Why it's wrong here

    This could cause an AccessDenied if the data is encrypted with SSE-KMS and the role lacks KMS permissions, but it is not the most likely cause given the scenario, as cross-account access typically fails due to missing IAM permissions on the role.

  • The SageMaker execution role does not have the necessary permissions to access the S3 bucket.

    Why this is correct

    The SageMaker execution role must have an IAM policy that grants access to the S3 bucket. Without it, even with a bucket policy, the training job will fail.

  • The S3 bucket is not configured with public access.

    Why it's wrong here

    Public access is not required for cross-account access; a bucket policy and proper IAM role permissions are sufficient.

  • The S3 bucket is in a different region and requires a VPC endpoint.

    Why it's wrong here

    A VPC endpoint is not needed for cross-account S3 access; it is used for private connectivity within VPCs.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

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 →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way 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. A company is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket in a different AWS account. Which IAM policy configuration is required to allow SageMaker to access the data?

easy
  • A.Add a bucket policy that allows s3:GetObject for the SageMaker execution role's ARN.
  • B.Add a bucket policy allowing access from the SageMaker execution role ARN, and ensure the SageMaker execution role has an IAM policy allowing s3:GetObject on the bucket.
  • C.Create an IAM user in the data owner's account and use its credentials in SageMaker.
  • D.Use the data owner's IAM role as the SageMaker execution role.

Why B: Cross-account access requires the SageMaker execution role to have an IAM policy allowing access to the S3 bucket, and the S3 bucket policy must grant access to that role. Option A is wrong because SageMaker cannot assume a role in another account without proper trust policy. Option C is wrong because the data owner's role cannot be used directly. Option D is wrong because SageMaker does not use the data owner's IAM user credentials.

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.