- Más nuevo
- Más votos
- Más comentarios
I assume you are trying to invoke lambda function through cloudwatch events. If so, then did you check, if resource permission has been added to lambda function for that newly created rule. Most of the cases, this gets missed and even if event would match, it won't be able to invoke lambda function.
For your reference, here is the cloudformation snippet, how you'd add lambda resource permissions for the event rule:
rLambdaInvokePermission:
Type: 'AWS::Lambda::Permission'
Properties:
FunctionName: !Ref myLambdaFunction
Action: 'lambda:InvokeFunction'
Principal: events.amazonaws.com
SourceArn: !GetAtt rEventRule.Arn
Second thing, I'd check, if event pattern is matching exactly what's defined in event rule or not. You can do that by testing the event rule pattern and see if it matches or not.
Also, I'd suggest you to take a look at this re:Post thread, which talks in details about the same topic.
Hoe you find this information helpful.
Comment here if you have additional questions, happy to help.
Abhishek
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año
- OFICIAL DE AWSActualizada hace 4 años
I did it via the console/UI in Amazon EventBridge bus from an outside source and a rule with 2 targets, a lambda and a cloudwatch event log group. Before getting your post, I decided to delete everything: lambda/rule/log groups and start from scratch. Somehow seems to be working now which is great but unfortunately I have no idea what made it work. Below is the cloudformation snipet of in my eventbridge rule. I do no see anything for LambdaInvokePermission. Perhaps your snippet is applicable for a different type of event source?
I'm glad you got it worked out.