Configuration in this directory creates Cloudwatch metric alarms for AWS Lambda. One metric alarm is based on metric_name
defined by AWS Lambda service, another metric alarm is based on metric_query
which monitors error rates (number of errors divided by the number of invocations).
To run this example you need to execute:
$ terraform init
$ terraform plan
$ terraform apply
Note that this example may create resources which cost money. Run terraform destroy
when you don't need these resources.
Name | Version |
---|---|
terraform | >= 1.0 |
aws | >= 5.58 |
No providers.
Name | Source | Version |
---|---|---|
alarm | ../../modules/metric-alarm | n/a |
alarm_anomaly | ../../modules/metric-alarm | n/a |
alarm_metric_query | ../../modules/metric-alarm | n/a |
all_lambdas_errors_alarm | ../../modules/metric-alarm | n/a |
aws_lambda_function1 | ../fixtures/aws_lambda_function | n/a |
aws_lambda_function2 | ../fixtures/aws_lambda_function | n/a |
aws_sns_topic | ../fixtures/aws_sns_topic | n/a |
No resources.
No inputs.
Name | Description |
---|---|
cloudwatch_metric_alarm_arn | The ARN of the Cloudwatch metric alarm |
cloudwatch_metric_alarm_id | The ID of the Cloudwatch metric alarm |
lambda_function1_arn | Lambda function ARN |
lambda_function1_name | Lambda function name |