2 Answers
- Newest
- Most votes
- Most comments
5
Hello.
In that case, try running the following command.
When you run the command below, you can check the "Sid" in the response.
aws lambda get-policy --function-name test
Below is an example response.
In the following response, "Sid" is "lambda-yyyyyyyy-yyyyyyyy-yyyyyyy".
{
"Policy": "{\"Version\":\"2012-10-17\",\"Id\":\"default\",\"Statement\":[{\"Sid\":\"lambda-yyyyyyyy-yyyyyyyy-yyyyyyy\",\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"events.amazonaws.com\"},\"Action\":\"lambda:InvokeFunction\",\"Resource\":\"arn:aws:lambda:ap-northeast-1:1111111111:function:test\",\"Condition\":{\"ArnLike\":{\"AWS:SourceArn\":\"arn:aws:events:ap-northeast-1:111111111:rule/test1\"}}}]}",
"RevisionId": "yyyyyyy-yyyy-yyyy-yyyy-yyyyyy"
}
Once you have confirmed the "Sid", you can delete it by specifying the Sid with the command below.
aws lambda remove-permission --function-name test --statement-id lambda-yyyyyyyy-yyyyyyyy-yyyyyyy
0
Hi,
Is your user allowed to delete EventBridge resources? Check with CloudTrail to see if you've a permission issue there?
Best,
Didier
Yes. The user has the permission to remove the triggers in the Lambda functions. Is this by design? Seems only happens to EventBridge triggers. Do I need to remove the trigger in the Lambda function before it's deleted in EventBridge? If the sequence is wrong, how to resolve this issue?
Relevant content
- asked a year ago
- Why can't I view the EventBridge trigger in my Lambda function that my CloudFormation stack created?AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 days ago
- AWS OFFICIALUpdated a month ago
It works. Thanks so much, Kobayashi-san.