I have a lambda function that triggers based on Schedule expression. I need to do this dynamically i.e users can define Schedule expression and add this to lambda via user web interface. I am using Java SDK
1 Answer
To create a CloudWatch Event rule, you can use the PutRule API operation to create the rule and then add the Lambda function as the target using PutTargets. The Lambda function should also allow CloudWatch Events to invoke the function in its function policy.
3 Comments
Adelin
Can you provide some tutorial link?
Paradigm
I've linked the two API operations that you need to use. Since you're using Java, you should find links to the Java SDK methods at the bottom of each of the pages. If you have trouble setting it up, post your code and the error that you get.
Adelin
Any idea how to provide params.