Skip to content

ccliver/terraform-aws-http-canary

Repository files navigation

Lambda to perform an HTTP health check and alert an SNS topic on failure.

Requirements

Name Version
terraform >= 1.0
archive >= 2.2.0
aws >= 6.0
null >= 3.2.1

Providers

Name Version
archive >= 2.2.0
aws >= 6.0
null >= 3.2.1

Modules

No modules.

Resources

Name Type
aws_cloudwatch_event_rule.canary resource
aws_cloudwatch_event_target.canary resource
aws_cloudwatch_metric_alarm.canary resource
aws_iam_policy.cloudwatch_access resource
aws_iam_policy_attachment.cloudwatch_access resource
aws_iam_role.iam_for_lambda resource
aws_iam_role_policy_attachment.test-attach resource
aws_lambda_function.canary resource
aws_lambda_permission.cloudwatch resource
aws_sns_topic.canary resource
aws_sns_topic_subscription.canary resource
null_resource.build_package resource
archive_file.lambda data source
aws_region.current data source

Inputs

Name Description Type Default Required
alert_endpoint The HTTP alert endpoint or email address. string n/a yes
app_name The name of the app you're testing. This will be used to name AWS resources so it should be unique. string n/a yes
cloudwatch_dimensions A map of key=value pairs to use as dimensions for the CloudWatch metric. map(string) {} no
cloudwatch_metric_name The name of the CloudWatch metric. string null no
cloudwatch_metric_namespace The namespace to put the CloudWatch metric under. string n/a yes
endpoint The HTTP endpoint to check. string n/a yes
lambda_timeout Lambda timeout in seconds. number 5 no
ok_return_codes List of HTTP return codes indicating the health check was a success. list(number)
[
200
]
no
request_timeout Timeout in seconds for GET request to endpoitn. string 5 no
schedule_expression The scheduling expression. For example, cron(0 20 * * ? *) or rate(5 minutes). string "rate(1 minute)" no
sns_subscription_protocol The SNS subscription protocol (email or http). string n/a yes

Outputs

No outputs.

About

HTTP healthcheck lambda with alerting

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •