Skip to content

A Terraform module to check is there any resource not included in active reserved instances and send notification to slack.

License

Notifications You must be signed in to change notification settings

kirkchen/tf_aws_lambda_check_ri_with_slack_notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scheduled AWS Reserved Instance Checker function

=============================

This module can be used to deploy an AWS Lambda function which is scheduled to check is there any resource not included in active reserved instances and send notification to slack

Module Input Variables

  • lambda_name - Unique name for Lambda function
  • schedule_expression - a valid rate or cron expression
  • webhook_url - url for sending check result to slack.
  • slack_channel - channel for sending check result to slack.
  • region - (optional) the region which wants to check reserved instances status.
  • timeout - (optional) the amount of time your Lambda Function has to run in seconds. Defaults to 30. See Limits
  • exclude_pattern - (optional) exclude instance with name which matches this pattern

Usage

module "lambda_scheduled" {
  source              = "github.com/kirkchen/tf_aws_lambda_check_ri_with_slack_notification"
  lambda_name         = "lambda_reserved_instance_checker"
  schedule_expression = "cron(0 6 * ? 3 *)"
  webhook_url         = "your_slack_webhook_url"
  exclude_pattern     = "(instance_a|instance_b)"
}

Outputs

  • lambda_arn - ARN for the created Lambda function

Author

Created and maintained by Kirk Chen

About

A Terraform module to check is there any resource not included in active reserved instances and send notification to slack.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published