Home > Enterprise >  How to send event from EventBridge to Lambda
How to send event from EventBridge to Lambda

Time:03-22

I want the Lambda function to be triggered every 10 minutes and the function to receive an event in the form of JSON from EventBridge. The event will contain a Document ID which will be used in the Lambda code. Currently, the EventBridge does not have the feature to send custom events to target for Rule Type Schedule. The custom event here is the Document ID which I want the Lambda function to receive as an event. How can I achieve this?

CodePudding user response:

It appears that your goal is:

  • Trigger an AWS Lambda function every n minutes
  • Pass static information in the event that will be received by the Lambda function

You can do this when configuring the target for a scheduled event:

  • Select the Lambda function as a target
  • In Additional Settings select "Configure target input" and Constant (JSON text)

The event will then be available in the Lambda function via the event parameter:

AWS EventBridge specify constant

  • Related