{"id":18368843,"url":"https://github.com/rpstreef/tf-lambda","last_synced_at":"2026-04-27T11:32:03.113Z","repository":{"id":212011241,"uuid":"241013746","full_name":"rpstreef/tf-lambda","owner":"rpstreef","description":"Terraform AWS Lambda module","archived":false,"fork":false,"pushed_at":"2020-03-02T04:57:54.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T21:16:28.676Z","etag":null,"topics":["aws","aws-lambda","cloudwatch","cloudwatch-alarms","lambda","terraform","terraform-module"],"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/rpstreef.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}},"created_at":"2020-02-17T03:46:10.000Z","updated_at":"2022-03-28T01:44:00.000Z","dependencies_parsed_at":"2023-12-12T04:39:24.841Z","dependency_job_id":null,"html_url":"https://github.com/rpstreef/tf-lambda","commit_stats":null,"previous_names":["rpstreef/tf-lambda"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rpstreef/tf-lambda","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpstreef%2Ftf-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpstreef%2Ftf-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpstreef%2Ftf-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpstreef%2Ftf-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpstreef","download_url":"https://codeload.github.com/rpstreef/tf-lambda/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpstreef%2Ftf-lambda/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["aws","aws-lambda","cloudwatch","cloudwatch-alarms","lambda","terraform","terraform-module"],"created_at":"2024-11-05T23:27:39.053Z","updated_at":"2026-04-27T11:32:03.099Z","avatar_url":"https://github.com/rpstreef.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform AWS Lambda module\n\n## About:\n\nSetup of a Lambda function with CloudWatch Alarms.\n\nThe following boolean variables control which alarms will be enabled;\n\n- __create_errorRate_alarm:__  Alarms on errors with a default of threshold of 1 percent during a 5 minute measurement period\n- __create_throttleCount_alarm:__ Alarm on throttle count of 1 within 1 minute measurement period\n- __create_iteratorAge_alarm:__ Alarm for Stream based invocations such as Kinesis, alerts you when the time to execute is over 1 minute within a 5 minute measurement period\n  - More on the iteratorAge metric [here](https://aws.amazon.com/premiumsupport/knowledge-center/lambda-iterator-age/)\n- __create_deadLetterQueue_alarm:__ Alarm for DLQueue messages (for async Lambda invocations or SQS queues for example), 1 message within 1 minute triggers the alarm.\n\nThis AWS Lambda module can integrate with the following:\n- __API Gateway:__ The parameter ```create_api_gateway_integration``` is set to ```true``` by default, supply the ```api_gateway_rest_api_id```\n- __SNS Topic:__ The parameter ```create_sns_topic_subscription``` is set to ```false``` by default. \n- __SQS:__ The parameter ```create_sqs_integration``` is set to ```false``` by default. This can create an event source mapping to an SQS queue.\n\n## How to use:\n\nUse the code below in combination with the tf-iam module (```module.iam.role_arn```) to set the correct IAM policies.\n\n```terraform\nmodule \"lambda\" {\n  source = \"github.com/rpstreef/tf-lambda?ref=v1.0\"\n\n  namespace         = var.namespace\n  region            = var.region\n  resource_tag_name = var.resource_tag_name\n\n  lambda_function_name = local.lambda_function_name\n  lambda_role_arn      = module.iam.role_arn\n  lambda_layer_arn     = var.lambda_layer_arn\n\n  lambda_memory_size = var.lambda_memory_size\n  lambda_timeout     = var.lambda_timeout\n\n  lambda_environment_variables = {\n    NAMESPACE = var.namespace\n    REGION    = var.region\n\n    COGNITO_USER_POOL_CLIENT_ID = var.cognito_user_pool_client_id\n    COGNITO_USER_POOL_ID        = var.cognito_user_pool_id\n\n    DEBUG_SAMPLE_RATE = var.debug_sample_rate\n  }\n\n  create_deadLetterQueue_alarm = false\n  create_iteratorAge_alarm     = false\n\n  api_gateway_rest_api_id = var.api_gateway_rest_api_id\n}\n```\n\n## Changelog\n\n### v1.3\n - Removed lambda_filename variable, use CI/CD instead to deploy Lambda code\n \n### v1.2\n - Added SQS event source integration\n \n### v1.1\n - Added SNS Topic subscription sub-module\n\n### v1.0\n - Initial release\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpstreef%2Ftf-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpstreef%2Ftf-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpstreef%2Ftf-lambda/lists"}