I have a Lambda function which gets invoked at a fixed schedule from EventBridge events. Is there any way to pass custom parameters(like a json file) to the invoked lambda function via an event rule?
I tried passing a json string inside withEventPattern in the PutRule object, like this:
{'detail': {"id" : ["unique_id"]}}
=> this lead to this error:
"Event pattern is not valid. Reason: Unrecognized match type instance-id\n at [Source: (String)\"{\"detail\":[{\"instance-id\":[\"d1983a77-dc0e-4724-953f-df283c1ad421\"]}]}\"
I understand this is not the appropriate way of doing this, but I was trying my luck.
When you create the EventBridge rule, you can specify JSON to pass for the event. Under "Additional settings" you can configure the target input, and one option is JSON. The following shows this in the console, and similar options are available if you create the rule via the APIs or CloudFormation:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With