1

I need to trigger a lambda function on some schedule and use cloudwatch for it. However, I need the labmda to be triggered with different parameters. Is there a way to specify message for a cloudwatch event? Is there any other way to trigger lambda on schedule with different messages?

1 Answer 1

3

When you create a Rule under EventBridge, you have multiple options for giving an input.

enter image description here

If your rule is triggered by an event, then you can select option 1 or 2. If you want to specify a constant input you can enter it as JSON text with the third option.

Since you are planning to use schedule, you can go for option 3, Constant. You can define multiple rules if you have different inputs or you can store your inputs in a table and then fetch them as needed. Depends on your requirement.

Not the answer you're looking for? Browse other questions tagged or ask your own question.