hardMultiple ChoiceObjective-mapped
SageMaker KMS Decrypt: Adding CreateGrant Permission
A company is using Amazon SageMaker to train a model. The training data is stored in an S3 bucket that is encrypted with an AWS KMS customer managed key (CMK). The training job fails with an error indicating that the SageMaker execution role does not have permission to decrypt the data. The administrator has verified that the execution role has the kms:Decrypt permission. What additional permission might be missing?
Quick Answer
The answer is the missing permission is kms:CreateGrant. This is correct because when SageMaker accesses encrypted S3 data, it must create a grant on the KMS key to allow the SageMaker service principal to decrypt the data on behalf of the execution role. Even if the execution role has kms:Decrypt, SageMaker itself needs permission to call kms:CreateGrant to set up this delegated access; without it, the service cannot establish the necessary cryptographic context for the training job. On the AWS Certified AI Practitioner AIF-C01 exam, this scenario tests your understanding of how SageMaker interacts with KMS grants, often appearing as a trap where candidates assume only kms:Decrypt is needed. A common memory tip is to think of CreateGrant as the "handshake" permission—SageMaker needs to shake hands with the KMS key before it can decrypt data on your behalf.
⚠ Common exam trap
Candidates often assume kms:Decrypt alone is sufficient, overlooking that SageMaker requires kms:CreateGrant to delegate decryption permissions to the SageMaker service principal for cross-account or service-integrated access.
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
✓
kms:CreateGrant
When SageMaker accesses encrypted S3 data, it must create a grant on the KMS key to allow the SageMaker service principal to decrypt the data on behalf of the execution role. Even if the execution role has kms:Decrypt, SageMaker itself needs permission to call kms:CreateGrant to set up this delegated access. Without kms:CreateGrant, the service cannot establish the necessary cryptographic context for the training job.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
kms:CreateGrant
Why this is correct
Allows SageMaker to create a grant on the KMS key for its internal service principal.
- ✗
kms:ReEncrypt
Why it's wrong here
Used to re-encrypt data under a different key, not for initial decryption.
- ✗
kms:DescribeKey
Why it's wrong here
Not necessary for decryption; used to view key metadata.
- ✗
kms:GenerateDataKey
Why it's wrong here
Used for creating new data keys, not for decryption.
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 AIF-C01 question is part of Courseiva's 619-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
1 more way this is tested on AIF-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 uses Amazon SageMaker to train a model on customer transaction data. The data is stored in an S3 bucket encrypted with SSE-KMS. The data scientists are using a SageMaker notebook instance to preprocess the data. The security team notices that the notebook instance can access the KMS key directly through the SageMaker console, even when the data scientists do not have explicit KMS permissions. What is the MOST likely reason for this behavior?
hard- A.The KMS key policy allows the SageMaker service to decrypt using the key, and the console displays this permission globally.
- B.The S3 bucket has a bucket policy that grants s3:GetObject access using the SageMaker service principal, bypassing KMS permissions.
- ✓ C.The SageMaker execution role attached to the notebook instance has permission to use the KMS key for the S3 bucket, and the SageMaker console uses that role to perform decryption operations on behalf of the user.
- D.The SageMaker notebook instance is using an IAM role that has the AWS managed policy AmazonSageMakerFullAccess, which includes kms:Decrypt for all keys.
Why C: The SageMaker notebook instance uses an execution IAM role that is assumed when performing operations. If that execution role has permissions to use the KMS key (e.g., kms:Decrypt, kms:GenerateDataKey) for the S3 bucket, the SageMaker console can leverage that role to decrypt data on behalf of the user, even if the user's own IAM identity lacks explicit KMS permissions. The console acts as a proxy, using the notebook's execution role to access the key.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AIF-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 AIF-C01 exam.