- I have an existing Lambda function.
- I can use the console to create a new Rule with my Lambda as the Target.
- When I do so via the console, it automatically creates a "EventBridge (CloudWatch Events)" Trigger which is visible on the Lambda configuration screen.
- The Rule executes and successfully invokes the Lambda.
Attempting to automate the above steps using C# and the SDK (nuget package: AWSSDK.EventBridge), I take the following steps:
- I call PutRule successfully.
- I call PutTarget successfully
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:
- I need to add an additional request to my code - something like PutTriggerOnLambda
- Or I am simply missing IAM permissions and it is failing silently
Anyone have a suggestion?