Skip to content

Terraform module for deploying EC2 Spot termination monitoring lambda

License

lablabs/terraform-aws-spot-termination-monitoring-lambda

Repository files navigation

EC2Spot Instance Termination Monitoring Lambda

Terraform validation

Overview

Deploy a lambda function triggered by Spot instance interruption warning event. Creates custom CloudWatch metrics indicating when the interruption event occured.

Creates a metric called SpotTerminationEvent with the following dimensions:

  • instance-type
  • ASG, AZ, VPC, instance-id, instance-type, private-ip, subnet
  • ASG
  • AZ
  • VPC
  • subnet

Creates a metric called SpotUptimeSeconds with the following dimensions:

  • ASG, AZ, VPC, instance-id, instance-type, private-ip, subnet

Examples

See Basic example for further information.

Requirements

No requirements.

Inputs

Name Description Type Default Required
aws_region n/a any n/a yes
name n/a any n/a yes
tags n/a any n/a yes
lambda_function_version Version of lambda function. See https://github.com/lablabs/terraform-aws-spot-termination-monitoring-lambda/releases string "0.0.2" no
lambda_function_zip_base_url Base URL of zip file with lambda function code. Path part with version number (see lambda_function_version variable) will be added automatically) string "https://github.com/lablabs/terraform-aws-spot-termination-monitoring-lambda/releases/download/" no
lambda_function_zip_filename Filename of zip file with lambda function code. Version number (see lambda_function_version variable) and .zip extension will be added automatically. string "aws-spot-termination-monitoring-lambda-" no

Outputs

No output.

About

Terraform module for deploying EC2 Spot termination monitoring lambda

Resources

License

Stars

Watchers

Forks

Packages

No packages published