-
Notifications
You must be signed in to change notification settings - Fork 680
Open
Description
After updating to 6.7.7, Lambda function (webhooks, scale-up, etc) began failing. No logs were generated, and it appeared the invocations were failing at an early stage. By manually executing the function, I encountered the following message:
Lambda was unable to decrypt the environment variables because KMS access was denied.
Please check the function's KMS key settings.
KMS Exception: AccessDeniedExceptionKMS Message: User: arn:aws:sts::361854753178:assumed-role/gha-action-scale-up-lambda-role/gha-scale-up is not authorized to perform: kms:Decrypt on resource: arn:aws:kms:ap-northeast-1:361854753178:key/362d8837-9815-4940-9267-80ba3b8d39f5 because no resource-based policy allows the kms:Decrypt action (Service: Kms, Status Code: 400, Request ID: 11fd6876-0959-4fb6-9eac-a297562a772a) (SDK Attempt Count: 1)
This is a known issue documented in the aws_lambda_function
resource documentation. When you recreate a Lambda function's IAM role, it may lose the KMS permissions required to decrypt environment variables. To resolve this issue, we need to recreate the function.
The IAM role are recreated due to the IAM role name changes in this PR #4696.
Some ideas to fix this issue:
- Configure the
replace_triggered_by
lifecycle rule to ensure roles and functions are recreated simultaneously. - Do not change existing IAM role names unless they exceed 64 characters.
akumlehn
Metadata
Metadata
Assignees
Labels
No labels