The script schedules the start/stop of RDS instances and Aurora clusters based on db tags.
Remember this use UCT Time
Usage
module "aws_rds_lambda_scheduler" {
source = ""
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_region | string | "eu-west-1" |
no | |
function_prefix | Prefix for the name of the resources created | string | "" |
no |
start_cron | Rate expression for when to run the start RDS lambda | string | "cron(0 7 ? * MON-FRI *)" |
no |
start_cron | Rate expression for when to run the stop RDS | string | "cron(0 21 ? * MON-FRI *)" |
no |
rds_tag_key | Key of the RDS tagged instance | string | "nightly" |
no |
rds_tag_value | Value of the RDS tagged instance | string | "onoff" |
no |
- RDS instance must be tagged with 'nightly':'onoff'
Configure your AWS credentials using one of the supported methods for AWS CLI
tools, such as setting the
AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
environment variables. If you're using the ~/.aws/config
file for profiles then export AWS_SDK_LOAD_CONFIG
as "True".