lambda-scheduler-stop-start

diodonfrost/lambda-scheduler-stop-start/aws

Terraform Module HCL AWS

Terraform module that creates a Lambda scheduler to stop and start resources on AWS

Install
module "lambda-scheduler-stop-start" {
source = "diodonfrost/lambda-scheduler-stop-start/aws"
version = "4.5.0"
}
plain text: /constructs/tfmod-diodonfrost-lambda-scheduler-stop-start-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-lambda-scheduler-stop-start ![CI](https://github.com/diodonfrost/terraform-aws-lambda-scheduler-stop-start/actions) 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

Inputs (24)
NameTypeDescriptionDefault
namestringDefine name to use for lambda function, cloudwatch event and iam role required
apprunner_scheduleboolEnable scheduling on AWS App Runner servicesfalse
custom_iam_role_arnstringCustom IAM role arn for the scheduling lambdanull
kms_key_arnstringThe ARN for the KMS encryption key. If this configuration is not provided when enull
aws_regionslist(string)A list of one or more aws regions where the lambda will be apply, default use thnull
resources_tagmap(string)DEPRECATED, use scheduler_tag variable insteadnull
scheduler_tagmap(string)Set the tag to use for identify aws resources to stop or start{ "key": "tostop", "value": "true" }
cloudwatch_alarm_scheduleboolEnable scheduleding on cloudwatch alarm resourcesfalse
dry_runboolEnable dry-run mode. When true, the Lambda will log actions without actually stofalse
runtimestringThe runtime environment for the Lambda function that you are uploading"python3.13"
autoscaling_scheduleboolEnable scheduling on autoscaling resourcesfalse
documentdb_scheduleboolEnable scheduling on documentdb resourcesfalse
ecs_scheduleboolEnable scheduling on ecs servicesfalse
rds_scheduleboolEnable scheduling on rds resourcesfalse
tagsmap(any)Custom tags on aws resourcesnull
cloudwatch_log_retentionnumberCloudwatch log retention in days14
schedule_expressionstringDefine the aws event rule schedule expression, https://docs.aws.amazon.com/sched"cron(0 22 ? * MON-FRI *)"
schedule_expression_timezonestringTimezone in which the scheduling expression is evaluated. Example : 'America/New"UTC"
scheduler_excluded_dateslist(string)List of specific dates to exclude from scheduling in MM-DD format (e.g., ['12-25[]
autoscaling_terminate_instancesboolTerminate instances when autoscaling group is scheduled to stopfalse
redshift_scheduleboolEnable scheduling on redshift resourcesfalse
Outputs (11)
lambda_iam_role_arn — The ARN of the IAM role used by Lambda function
lambda_iam_role_name — The name of the IAM role used by Lambda function
scheduler_lambda_invoke_arn — The ARN to be used for invoking Lambda function from API Gateway
scheduler_lambda_function_last_modified — The date Lambda function was last modified
scheduler_log_group_name — The name of the scheduler log group
scheduler_expression — The expression of the scheduler
scheduler_timezone — The timezone of the scheduler
scheduler_lambda_arn — The ARN of the Lambda function
scheduler_lambda_name — The name of the Lambda function
scheduler_lambda_function_version — Latest published version of your Lambda function
scheduler_log_group_arn — The Amazon Resource Name (ARN) specifying the log group
Resources (8)
archive_fileaws_cloudwatch_log_groupaws_iam_policyaws_iam_roleaws_iam_role_policyaws_iam_role_policy_attachmentaws_lambda_functionaws_scheduler_schedule
Details
FrameworkTerraform Module
LanguageHCL
Version4.5.0
Cloud AWS
★ Stars81
Forks79
Total downloads410.9k
Inputs24
Outputs11
Resources8
Examples24
LicenseApache-2.0
Namespacediodonfrost
Updated