Scheduled Lambda Job Module
This module makes it easy to run an AWS Lambda function (such as one created with the lambda module) on a scheduled basis. This is useful for periodic background jobs, such as taking a daily snapshot of your servers.
Background info
For more information on AWS Lambda, how it works, and how to configure your functions, check out the lambda module documentation.
Reference
- Inputs
- Outputs
Required
lambda_function_arn
stringThe ARN of the lambda function.
lambda_function_name
stringThe name of the lambda function.
schedule_expression
stringAn expression that defines the schedule for this lambda job. For example, cron(0 20 * ? ) or rate(5 minutes).
Optional
create_resources
boolSet to false to have this module skip creating resources. This weird parameter exists solely because Terraform does not support conditional modules. Therefore, this is a hack to allow you to conditionally decide if this module should create anything or not.
true
lambda_function_input
stringJSON text that will be passed to the lambda function on each invoke.
null
namespace
stringThe namespace to use for all resources created by this module. If not set, lambda_function_name
, with '-scheduled' as a suffix, is used.
null
tags
map(string)A map of tags to apply to the event rule.
{}
Cloudwatch Event Rule Arn
Cloudwatch Event Rule schedule expression