{"id":19717115,"url":"https://github.com/xsalazar/terraform-aws-lambda-networking","last_synced_at":"2025-04-29T20:30:50.904Z","repository":{"id":40250428,"uuid":"283405704","full_name":"xsalazar/terraform-aws-lambda-networking","owner":"xsalazar","description":"🧮 Terraform template for allowing Lambda access to both private VPC resources and public internet access. This repository provides a baseline architecture for VPC, Internet Gateway, NAT Gateway, and Route Table configuration for AWS resources.","archived":false,"fork":false,"pushed_at":"2025-04-14T06:58:35.000Z","size":674,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T07:43:35.795Z","etag":null,"topics":["aws","aws-lambda","express","lambda","redis","terraform"],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xsalazar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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,"zenodo":null},"funding":{"github":"xsalazar"}},"created_at":"2020-07-29T05:20:15.000Z","updated_at":"2025-04-14T06:58:37.000Z","dependencies_parsed_at":"2023-09-25T09:54:33.901Z","dependency_job_id":"158f5ca2-0000-48cd-9ee6-42b6ee341a5a","html_url":"https://github.com/xsalazar/terraform-aws-lambda-networking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsalazar%2Fterraform-aws-lambda-networking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsalazar%2Fterraform-aws-lambda-networking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsalazar%2Fterraform-aws-lambda-networking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xsalazar%2Fterraform-aws-lambda-networking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xsalazar","download_url":"https://codeload.github.com/xsalazar/terraform-aws-lambda-networking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251578304,"owners_count":21612012,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","express","lambda","redis","terraform"],"created_at":"2024-11-11T22:44:42.554Z","updated_at":"2025-04-29T20:30:50.431Z","avatar_url":"https://github.com/xsalazar.png","language":"HCL","funding_links":["https://github.com/sponsors/xsalazar"],"categories":[],"sub_categories":[],"readme":"# Terraform/AWS Lambda Networking Boilerplate\n\nThis project is aimed at outlining a small AWS project in which a simple NodeJS application is deployed to a Lambda function.\nAn API Gateway will forward requests to the Lambda, which will then do a sanity check that it can access a Redis database in the private subnet. Additionally, it will check that it can initiate an HTTP request out to the public internet to verify the networking is correctly configured.\n\n## Getting Started\n\n### Updating Application Code\n\nThe application code that is deployed to Lambda lives in the [./app](./app) directory in the `index.js` file. Currently, this code does two checks:\n\n- Test whether connections over the private AWS subnet are successful to talk to the Redis database\n- Test whether public HTTP requests on the public internet can be initiated from the Lambda successfully\n\nThis repository is configured to use [VSCode's devcontainer support](https://code.visualstudio.com/docs/remote/containers) to allow for local, containerized testing a development. Once VSCode has started the container, exectute the following commands on the container CLI to start Redis:\n\n```bash\napt-get update\napt-get install redis\nredis-server\n```\n\nIn VSCode, you can now press `F5` to launch the application or run `cd app \u0026\u0026 npm start` from a separate CLI window.\n\n### Updating Infrastructure\n\nThe infrastructure that manages the AWS Cloud Resources lives in the [./terraform](./terraform) directory. This infrastructure can be deployed in the Actions tab of the repository. If it is the first time the infrastructure is being provisioned, a dummy Hello World application will be deployed to AWS as a placeholder.\n\nAll subsequent infrastructure changes can be deployed in the same way.\n\n## CI/CD\n\nThis repository has two main ways to facilitate CI/CD built-in to GitHub-native workflows:\n\n- Deploy Application: this workflow will package up the application code into a `.zip` file and deploy it to the running Lambda function via the AWS CLI\n- Deploy Infrastructure: this workflow will utilize Terraform to apply the latest version of the infrastructure to the AWS Cloud\n\n## Architecture\n\n![](assets/architecture.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsalazar%2Fterraform-aws-lambda-networking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxsalazar%2Fterraform-aws-lambda-networking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxsalazar%2Fterraform-aws-lambda-networking/lists"}