- Inspect
- Diagnose
- Apply fix
- Verify
Your mission
The reporting job can download an encrypted object from S3, but fails when AWS KMS tries to decrypt its data key.
- workload
- role/reporting-job
- status
- job failing
- symptom
- kms:Decrypt is denied for one application key
Current objective
Read the failing API call and identify which authorization layer denied it.
Show a hint
Try: aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=Decrypt Scoped KMS permission
Action = ["kms:Decrypt"]
Resource = [<key-arn>]
Condition = {
StringLike = { "kms:EncryptionContext:aws:s3:arn" = <object-prefix> }
} Restart clears this attempt. Completed labs are remembered in this browser.
Incident review
The reporting role can decrypt only its data.
The exact KMS request is allowed without granting wildcard decrypt access.
Lesson
Trace AccessDenied to the API that actually rejected the call. For KMS, scope permissions by key and encryption context so a necessary decrypt grant does not become a general-purpose decryption capability.
Choose another scenarioCommand transcript
Your commands and their output will appear here.
Edit reporting-kms-policy.tf
Scope the permission to the reporting key and the reports/ object prefix.