AWS Compute Blog

Simply Serverless: Use constant values in Cloudwatch event triggered Lambda functions

Welcome to the second post in our new series: Simply Serverless, today we will show you a quick tip for using Cloudwatch Events with AWS Lambda.

When using an AWS Cloudwatch rule to trigger a Lambda event, one of the multiple options you have to pass data onto your Lamba function is “Constant (JSON Text)”. This handy feature allows you to send static content to your function instead of the matched event.

constant values

Keep in mind that you can also create the input targets via the CLI:

aws events put-targets --rule testjson --targets file://targetfile

Hope you’ve enjoyed, and as always I’m listening! @listonb

Bryan Liston