lambda-scheduler-stop-start
diodonfrost/lambda-scheduler-stop-start/aws
Terraform module that creates a Lambda scheduler to stop and start resources on AWS
terraform-aws-lambda-scheduler-stop-start  Stop and start instance, rds resources and autoscaling groups with lambda function. Note: To deploy multiple schedulers at once, you can use this wrapper module lambda-multi-schedulers-stop-start which simplifies the management of multiple schedules. Terraform versions For Terraform 0.15 use version v3. of this module. If you are using Terraform 0.11 you can use versions v1.. Features Aws lambda runtine Python 3.7 ec2 instances scheduling ecs service scheduling rds clusters scheduling rds instances scheduling redshift clusters scheduling documentdb clusters scheduling autoscalings scheduling cloudwatch alarm scheduling Aws CloudWatch logs for lambda Aws Transfer
| Name | Type | Description | Default |
|---|---|---|---|
| name | string | Define name to use for lambda function, cloudwatch event and iam role | required |
| apprunner_schedule | bool | Enable scheduling on AWS App Runner services | false |
| custom_iam_role_arn | string | Custom IAM role arn for the scheduling lambda | null |
| kms_key_arn | string | The ARN for the KMS encryption key. If this configuration is not provided when e | null |
| aws_regions | list(string) | A list of one or more aws regions where the lambda will be apply, default use th | null |
| resources_tag | map(string) | DEPRECATED, use scheduler_tag variable instead | null |
| scheduler_tag | map(string) | Set the tag to use for identify aws resources to stop or start | {
"key": "tostop",
"value": "true"
} |
| cloudwatch_alarm_schedule | bool | Enable scheduleding on cloudwatch alarm resources | false |
| dry_run | bool | Enable dry-run mode. When true, the Lambda will log actions without actually sto | false |
| runtime | string | The runtime environment for the Lambda function that you are uploading | "python3.13" |
| autoscaling_schedule | bool | Enable scheduling on autoscaling resources | false |
| documentdb_schedule | bool | Enable scheduling on documentdb resources | false |
| ecs_schedule | bool | Enable scheduling on ecs services | false |
| rds_schedule | bool | Enable scheduling on rds resources | false |
| tags | map(any) | Custom tags on aws resources | null |
| cloudwatch_log_retention | number | Cloudwatch log retention in days | 14 |
| schedule_expression | string | Define the aws event rule schedule expression, https://docs.aws.amazon.com/sched | "cron(0 22 ? * MON-FRI *)" |
| schedule_expression_timezone | string | Timezone in which the scheduling expression is evaluated. Example : 'America/New | "UTC" |
| scheduler_excluded_dates | list(string) | List of specific dates to exclude from scheduling in MM-DD format (e.g., ['12-25 | [] |
| autoscaling_terminate_instances | bool | Terminate instances when autoscaling group is scheduled to stop | false |
| redshift_schedule | bool | Enable scheduling on redshift resources | false |
lambda_iam_role_arn — The ARN of the IAM role used by Lambda functionlambda_iam_role_name — The name of the IAM role used by Lambda functionscheduler_lambda_invoke_arn — The ARN to be used for invoking Lambda function from API Gatewayscheduler_lambda_function_last_modified — The date Lambda function was last modifiedscheduler_log_group_name — The name of the scheduler log groupscheduler_expression — The expression of the schedulerscheduler_timezone — The timezone of the schedulerscheduler_lambda_arn — The ARN of the Lambda functionscheduler_lambda_name — The name of the Lambda functionscheduler_lambda_function_version — Latest published version of your Lambda functionscheduler_log_group_arn — The Amazon Resource Name (ARN) specifying the log group