A training job fails with AccessDenied when reading an encrypted S3 bucket, even though the execution role allows s3:GetObject. What should the engineer check next?
- Exam domain
- Operating, Monitoring, and Securing ML and AI Solutions24% of the exam
- Difficulty
- Hard
- In this mock
- 21 questions on this domainPractise this domain
Why the exam asks this
Task 4.3: Secure ML and AI workloads and model endpoints.
Objective in the exam guide: Skill 4.3.5: Troubleshoot and debug security issues in ML and AI systems.
AccessDenied errors are common in ML pipelines, and the cause is often not the obvious policy. A systematic check saves hours.
Why A is the answer
Whether the role is allowed to use the KMS key that encrypts the data, and whether the bucket policy denies it
Reading encrypted objects needs both S3 permission and permission to use the KMS key, and a bucket policy can still deny access.
Remember: Access denied on encrypted data: check the KMS key permission and the bucket policy too.
How it works
An S3 read can be denied by the identity policy, the bucket policy or, for encrypted objects, the KMS key policy.
Allowing s3:GetObject is not enough if the role cannot use the key that decrypts the object.
CloudTrail records the denied call, which helps pinpoint which policy blocked it.
Clues in the question
The words that point to the answer, and what each one tells you.
- Encrypted S3 bucket
- A KMS key is involved.
- Role already allows s3:GetObject
- The block is elsewhere.
In detail
- Access decisions combine identity policies, resource policies and key policies.
- CloudTrail shows which call was denied.
Side by side with look-alikes
| Policy layer | Can deny the read? |
|---|---|
| Execution role (identity) | Yes |
| Bucket policy (resource) | Yes |
| KMS key policy | Yes, for encrypted data |
| Auto scaling policy | No |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Whether the role is allowed to use the KMS key that encrypts the data, and whether the bucket policy denies itRight
Access denied on encrypted data: check the KMS key permission and the bucket policy too.
B. The model's learning rateWrong
Training hyperparameters do not affect access.
C. The endpoint auto scaling policyWrongMost tempting
Endpoint scaling is unrelated to a training job.
Why it tempts: It is a policy, which sounds related to permissions. But it controls instance counts for an endpoint, not access for a training job.
D. The number of training epochsWrong
Epochs do not affect access.
In practice
- Check CloudTrail for the exact denied action.
- Grant kms:Decrypt for the key to the training role.
Use case
An illustrative scenario, not a real incident.
An engineer finds the key policy does not include the training role, adds it, and the job reads its data.
See how it works
flowchart LR
R["Training role reads object"] --> I{"Identity policy allows?"}
I -->|"Yes"| B{"Bucket policy allows?"}
B -->|"Yes"| K{"Key policy allows decrypt?"}
K -->|"Yes"| OK["Read succeeds"]
K -->|"No"| D["AccessDenied"]How to read this chart
- "Training role reads object" leads to "Identity policy allows?".
- At "Identity policy allows?": if "Yes", go to "Bucket policy allows?".
- At "Bucket policy allows?": if "Yes", go to "Key policy allows decrypt?".
- At "Key policy allows decrypt?": if "Yes", go to "Read succeeds"; if "No", go to "AccessDenied".