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?
1 Answer
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:

4 Comments
kuanb
Any chance you know the pattern to accomplish the same via CloudFormation? I am can trigger a lambda regularly via a
AWS::Events::Rule w/ a ScheduleExpression pattern but am unclear on how to include a constant JSON as shown above. Was hoping the docs would help here, but perhaps am missing something obvious.John Rotenstein
I think it would use the
Input field in AWS::Events::Rule Target, which is referenced from AWS::Events::Rule.Pedro Henrique
Do you know how could do it with yaml?
John Rotenstein
@PedroHenrique The above documentation page for
Rule Target shows a YAML example that references Input.
eventthat will be received by the Lambda function? Will this information be static (that is, the same every time that the function is invoked), or will it change each time (in which case, where does that data come from)?