{"id":26010006,"url":"https://github.com/byu-oit/terraform-aws-alert-lambda","last_synced_at":"2026-03-06T16:35:10.764Z","repository":{"id":62909530,"uuid":"551625287","full_name":"byu-oit/terraform-aws-alert-lambda","owner":"byu-oit","description":"Lambda for Subscribing to an SNS Topic for CloudWatch Alarm from Metrics","archived":false,"fork":false,"pushed_at":"2024-01-31T20:02:42.000Z","size":2069,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-12-07T21:55:19.019Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byu-oit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-14T19:11:40.000Z","updated_at":"2023-07-18T20:39:54.000Z","dependencies_parsed_at":"2025-03-05T22:30:05.323Z","dependency_job_id":"7f6ce101-68b4-4abf-a445-21ec4cf98526","html_url":"https://github.com/byu-oit/terraform-aws-alert-lambda","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/byu-oit/terraform-aws-alert-lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-alert-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-alert-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-alert-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-alert-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byu-oit","download_url":"https://codeload.github.com/byu-oit/terraform-aws-alert-lambda/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byu-oit%2Fterraform-aws-alert-lambda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30185577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T14:42:24.748Z","status":"ssl_error","status_checked_at":"2026-03-06T14:42:14.925Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-05T22:26:49.347Z","updated_at":"2026-03-06T16:35:10.731Z","avatar_url":"https://github.com/byu-oit.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Latest GitHub Release](https://img.shields.io/github/v/release/byu-oit/terraform-aws-alert-lambda?sort=semver)\n\n# Terraform Aws Alert Lambda Module\nLambda for Subscribing to an SNS Topic for CloudWatch Alarm from Metrics and sending it to Operations as the expected JSON object.\nSee [monitoring-json-object.md](./monitoring-json-object.md) File for and Example...\n\n#### [New to Terraform Modules at BYU?](https://devops.byu.edu/terraform/index.html)\n\nThis module deploys a Lambda behind an ALB that receives Alarm Data from Metrics that exists in CloudWatch.\nThat Alarm Data is then reformatted into the expected format that Operations is expecting to receive.\n\n## Usage\n```\nmodule \"alert_lambda\" {\n  source = \"github.com/byu-oit/terraform-aws-alert-lambda?ref=v1.1.1\"\n}\n```\n\n## Requirements\n* Terraform version 1.3.0 or greater\n* AWS Provider 3.75.2 or greater\n* BYU-ACS version 3.5.0 or greater\n\n\nSee [examples/simple/simple-example.tf](examples/simple/simple-example.tf) for a working example.\n```\nmodule \"simple_test\" {\n  source                           = \"../../\"\n  app_name                         = \"alert-lambda-simple-test\"\n  monitoring_host                  = \"https://in.monitoringdev.byu.edu/\"\n  kb                               = \"KB000000\"\n  lambda_role_permissions_boundary = module.acs.role_permissions_boundary.arn\n  vpc_id                           = module.acs.vpc.id\n  subnet_ids                       = module.acs.private_subnet_ids\n  metric_alarm_configs = [{\n    alarm_name          = \"simple-test-cpu-utilization-alarm\"\n    statistic           = \"Average\"\n    metric_name         = \"CPUUtilization\"\n    comparison_operator = \"GreaterThanThreshold\"\n    threshold           = 85\n    period              = 60\n    evaluation_periods  = 1\n    alarm_description   = \"Alarm fires on cpu utilization\"\n    namespace           = \"AWS/ECS\"\n    dimensions = {\n      ServiceName = \"tyk-identity-api-dev\"\n      ClusterName = \"tyk-identity-api-dev\"\n    }\n  }]\n}\n```\n\n## Inputs\n| Name                             | Type         | Description                                                                                                                      | Default                       |\n|----------------------------------|--------------|----------------------------------------------------------------------------------------------------------------------------------|-------------------------------|\n| app_name                         | string       | The application name to include in the name of resources created.                                                                |                               |\n| kb                               | string       | The KB article identifier for operations to use to resolve the alert. For example, KB0000000                                     |                               |\n| monitoring_host                  | string       | The host to ship the Monitoring JSON Object to.                                                                                  | https://in.monitoring.byu.edu |\n| monitoring_path                  | string       | The monitoring api path.                                                                                                         | generic/process-event         |\n| lambda_role_permissions_boundary | string       | The ARN of the role permissions boundary to attach to the Lambda role.                                                           | \"\"                            |\n| log_retention_in_days            | number       | The number of days to retain logs for the sns-to-teams Lambda.                                                                   | 7                             |\n| memory_size                      | number       | The amount of memory for the function.                                                                                           | 128                           |\n| timeout                          | number       | The number of seconds the function is allowed to run.                                                                            | 30                            |\n| tags                             | map(string)  | A map of AWS Tags to attach to each resource created.                                                                            | {}                            |\n| metric_alarm_configs             | list(map)    | Array of Alarm objects                                                                                                           | see example in variables.tf   |\n| vpc_id                           | string       | Use a VPC for the lambda ingester functions. Pass in a vpc to enable.                                                            | \"\"                            |\n| security_group_ids               | list(string) | A list of security group ids for the VPC configuration regarding the ingester lambda functions. Only required if VPC is enabled. | []                            |\n| period                           | number       | (Optional) The period in seconds over which the specified statistic is applied.                                                  |                               |\n\n### \"metric_alarm_configs\" Object Types supported from variables.tf:53-67\n```\nvariable \"metric_alarm_configs\" {\n  type = list(object({\n    alarm_name          = string\n    statistic           = string\n    metric_name         = string\n    namespace           = string\n    comparison_operator = string\n    threshold           = number\n    period              = number\n    evaluation_periods  = number\n    alarm_description   = string\n    dimensions          = map(string)\n  }))\n  description = \"Array of Alarm objects\"\n}\n```\n\n## Outputs\n| Name | Type | Description |\n|------|------|-------------|\n|      |      |             |\n\n## Future Modifications...\nIf you need to modify the standard SNS Topic for something special.\nSee [Terraform aws_sns_topic](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/sns_topic)\n\nThere are several configurable Alarm Metric Alarm inputs that you can work with.\nSee [Terraform aws_cloudwatch_metric_alarm](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_metric_alarm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyu-oit%2Fterraform-aws-alert-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyu-oit%2Fterraform-aws-alert-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyu-oit%2Fterraform-aws-alert-lambda/lists"}