Reputation: 877
Attempting to automate the above steps using C# and the SDK (nuget package: AWSSDK.EventBridge), I take the following steps:
The Rule & Target look perfectly normal and functional in the EventBridge console, but the Trigger does not appear on the Lambda function at all and the Lambda is never invoked by the Rule.
If I now edit the Rule, don't change anything but just click Update in the console, it wires it up successfully with a Trigger.
I'm guessing it is one of two scenarios:
Anyone have a suggestion?
Upvotes: 1
Views: 2275
Reputation: 877
I got some really good technical support from AWS and learned that the step I was missing was to Add Permission to the lambda function to allow the Event Bridge Rule to trigger it.
This doc explains the situation: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CWE_Troubleshooting.html#LAMfunctionNotInvoked
This doc 2.2 explains the missing step via CLI: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/RunLambdaSchedule.html
And this doc explains how to do it via SDK: https://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html
Upvotes: 1