Question 816 of 1,755
ModelingeasyMultiple ChoiceObjective-mapped

Quick Answer

The answer is that the IAM policy is missing the `kms:GenerateDataKey` permission. This is correct because when an S3 bucket is encrypted with AWS KMS (SSE-KMS), any write operation like `s3:PutObject` requires the caller to have explicit permission to use the customer master key (CMK) to generate a data key for encryption. Without `kms:GenerateDataKey`, the SageMaker training job’s attempt to write output objects is denied, even if the policy allows S3 write access. On the AWS Certified Machine Learning Specialty MLS-C01 exam, this scenario tests your understanding of how KMS encryption interacts with SageMaker training jobs—a common trap is assuming `s3:PutObject` alone is sufficient. Remember that KMS-protected S3 buckets demand both S3 and KMS permissions; the key mnemonic is “Put needs GenerateDataKey” to avoid the AccessDenied error.

MLS-C01 Modeling Practice Question

This MLS-C01 practice question tests your understanding of modeling. 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.

Exhibit

Refer to the exhibit.

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateTrainingJob",
        "sagemaker:DescribeTrainingJob",
        "sagemaker:StopTrainingJob"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/*"
    }
  ]
}
```

A data scientist is trying to run a SageMaker training job that writes output to an S3 bucket 'my-bucket'. The IAM policy is shown. The training job fails with an AccessDenied error when trying to write to S3. What is the reason?

Question 1easymultiple choice
Full question →

Exhibit

Refer to the exhibit.

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "sagemaker:CreateTrainingJob",
        "sagemaker:DescribeTrainingJob",
        "sagemaker:StopTrainingJob"
      ],
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
        "s3:PutObject"
      ],
      "Resource": "arn:aws:s3:::my-bucket/*"
    }
  ]
}
```

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 S3 bucket is encrypted with AWS KMS and the policy does not include kms:GenerateDataKey

The correct answer is A because the training job fails with an AccessDenied error when writing to an S3 bucket that is encrypted with AWS KMS. The IAM policy shown must include the `kms:GenerateDataKey` permission to allow the SageMaker training job to generate a data key for encrypting the output objects. Without this KMS permission, the S3 PutObject operation is denied even if the policy allows `s3:PutObject`, as KMS encryption requires explicit authorization to use the customer master key (CMK).

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 S3 bucket is encrypted with AWS KMS and the policy does not include kms:GenerateDataKey

    Why this is correct

    When KMS encryption is used, SageMaker needs kms:GenerateDataKey permission to write.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The policy does not allow s3:ListBucket

    Why it's wrong here

    ListBucket is not required if the exact key is specified.

  • The policy does not allow s3:PutObject

    Why it's wrong here

    The policy explicitly allows s3:PutObject.

  • The policy does not allow s3:PutObjectAcl

    Why it's wrong here

    PutObjectAcl is not required for training job output.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often focus only on S3 permissions (like `s3:PutObject`) and overlook the need for KMS permissions when the bucket uses SSE-KMS, leading them to incorrectly select Option C or D.

Trap categories for this question

  • Command / output trap

    PutObjectAcl is not required for training job output.

Detailed technical explanation

How to think about this question

When an S3 bucket uses AWS KMS server-side encryption (SSE-KMS), the S3 PutObject API call triggers a KMS `GenerateDataKey` request to obtain a data key for encryption. The IAM principal (here, the SageMaker execution role) must have `kms:GenerateDataKey` and `kms:Decrypt` permissions on the CMK. Without these, the S3 operation fails with an AccessDenied error, even if the S3 policy allows `s3:PutObject`. This is a common pitfall because the error message originates from S3 but the root cause is a missing KMS permission, not an S3 permission.

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.

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.

Related practice questions

Related MLS-C01 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free MLS-C01 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this MLS-C01 question test?

Modeling — This question tests Modeling — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: The S3 bucket is encrypted with AWS KMS and the policy does not include kms:GenerateDataKey — The correct answer is A because the training job fails with an AccessDenied error when writing to an S3 bucket that is encrypted with AWS KMS. The IAM policy shown must include the `kms:GenerateDataKey` permission to allow the SageMaker training job to generate a data key for encrypting the output objects. Without this KMS permission, the S3 PutObject operation is denied even if the policy allows `s3:PutObject`, as KMS encryption requires explicit authorization to use the customer master key (CMK).

What should I do if I get this MLS-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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

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.

Loading comments…

Sign in to join the discussion.

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.