Unable to remove the EventBridge trigger in Lambda function

0

Why can't I remove the Eventbridge trigger in my Lambda function configuration if the rule has already been deleted in Eventbridge? When I click on 'Delete', it shows me the same screen.

Enter image description here

질문됨 7달 전650회 조회
2개 답변
4
수락된 답변

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
profile picture
전문가
답변함 7달 전
profile pictureAWS
전문가
검토됨 7달 전
  • It works. Thanks so much, Kobayashi-san.

0

Hi,

Is your user allowed to delete EventBridge resources? Check with CloudTrail to see if you've a permission issue there?

Best,

Didier

profile pictureAWS
전문가
답변함 7달 전
  • 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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠