Detection

Lambda log delivery fails after its log group is associated with an enabled, same-Region symmetric KMS key; the execution role still has all required CloudWatch Logs permissions. The key policy authorizes the execution role but not CloudWatch Logs, and access must be restricted to this log group; which key-policy change is appropriate?

Show the answer

Correct answerA. Authorize the regional Logs service principal, restricting kms:EncryptionContext:aws:logs:arn to the log group ARN.

AWhy this is right: The regional Logs principal needs KMS access, and the log group encryption context provides the required scope.

BWhy not this: CloudWatch Logs supplies a log group ARN, so a condition requiring a log stream ARN will not match.

CWhy not this: The Lambda service is not the encrypting principal, and the encryption context is not the function ARN.

DWhy not this: Lambda's execution role does not perform CloudWatch Logs encryption operations on the stored events.

CloudWatch Logs performs the KMS operations and supplies the log group ARN as the aws:logs:arn encryption context. Authorizing only the Lambda execution role does not authorize the Logs service, and a log stream ARN would not match the supplied context.