This repo contains modules for deploying and managing AWS Lambda functions:
lambda: A module for deploying and managing Lambda functions.
lambda-edge: A module for deploying and managing Lambda@Edge functions.
scheduled-lambda-job: A module that configures AWS to run a Lambda function on a
periodic basis.
Click on each module above to see its documentation. Head over to the examples folder for examples.
What is a Gruntwork module?
At Gruntwork, we've taken the thousands of hours we spent building infrastructure on AWS and
condensed all that experience and code into pre-built packages or modules. Each module is a battle-tested,
best-practices definition of a piece of infrastructure, such as a VPC, ECS cluster, or an Auto Scaling Group. Modules
are versioned using Semantic Versioning to allow Gruntwork clients to keep up to date with the
latest infrastructure best practices in a systematic way.
To use a module in your Terraform templates, create a module resource and set its source field to the Git URL of
this repo. You should also set the ref parameter so you're fixed to a specific version of this repo, as the main
branch may have backwards incompatible changes (see module
sources).
For example, to use v1.0.8 of the standalone-server module, you would add the following:
module"ecs_cluster" {
source = "git::git@github.com:gruntwork-io/terraform-aws-server.git//modules/standalone-server?ref=v1.0.8"// set the parameters for the standalone-server module
}
Note: the double slash (//) is intentional and required. It's part of Terraform's Git syntax (see module
sources).
See the module's documentation and variables.tf file for all the parameters you can set. Run terraform get -update to
pull the latest version of this module from this repo before running the standard terraform plan and
terraform apply commands.
Using scripts & binaries
You can install the scripts and binaries in the modules folder of any repo using the Gruntwork
Installer. For example, if the scripts you want to install are
in the modules/ecs-scripts folder of the https://github.com/gruntwork-io/terraform-aws-ecs repo, you could install them
as follows:
See the docs for each script & binary for detailed instructions on how to use them.
Developing a module
Versioning
We are following the principles of Semantic Versioning. During initial development, the major
version is to 0 (e.g., 0.x.y), which indicates the code does not yet have a stable API. Once we hit 1.0.0, we will
follow these rules:
Increment the patch version for backwards-compatible bug fixes (e.g., v1.0.8 -> v1.0.9).
Increment the minor version for new features that are backwards-compatible (e.g., v1.0.8 -> 1.1.0).
Increment the major version for any backwards-incompatible changes (e.g. 1.0.8 -> 2.0.0).
The version is defined using Git tags. Use GitHub to create a release, which will have the effect of adding a git tag.
{"treedata":{"name":"root","toggled":true,"children":[{"name":".circleci","children":[{"name":"config.yml","path":".circleci/config.yml","sha":"7556e57dbb39270ff5704234c896218c1d905872"},{"name":"post-upgrade-test-results.sh","path":".circleci/post-upgrade-test-results.sh","sha":"a4867e8fbdc334b7a90259568ee41ea577fbe764"},{"name":"set-upgrade-test-vars.sh","path":".circleci/set-upgrade-test-vars.sh","sha":"04ccab865d51c1169f7ae4648c38a3d98a9889ab"}]},{"name":".github","children":[{"name":"ISSUE_TEMPLATE","children":[{"name":"bug_report.md","path":".github/ISSUE_TEMPLATE/bug_report.md","sha":"d2e87e27c601e423865ed660ec697082470ca60f"},{"name":"feature_request.md","path":".github/ISSUE_TEMPLATE/feature_request.md","sha":"023a33099be2336476930c96e17ff1ba5dc55348"}]},{"name":"pull_request_template.md","path":".github/pull_request_template.md","sha":"6b100e40e323b5b07f40ed30616277c51c9f4b9e"}]},{"name":".gitignore","path":".gitignore","sha":"8a502c2bba2544ba8beae9a45fde2398da238cd7"},{"name":".patcher","children":[{"name":"patches","children":[{"name":"v0.14.0","children":[{"name":"migrate-state","children":[{"name":"create_script_for_terraform_state_mv.sh","path":".patcher/patches/v0.14.0/migrate-state/create_script_for_terraform_state_mv.sh","sha":"38b6bf438e1961cd3eeb16f9c52e480bc31df63e"},{"name":"patch.yaml","path":".patcher/patches/v0.14.0/migrate-state/patch.yaml","sha":"451f5fd7eb11feb9d53afb913103668b55b99021"}]}]},{"name":"v0.15.0","children":[{"name":"iam-inline-policies","children":[{"name":"patch.yaml","path":".patcher/patches/v0.15.0/iam-inline-policies/patch.yaml","sha":"e732d40006c01e3a0c81625005633d28ef566b39"},{"name":"var_use_managed_iam_policies.sh","path":".patcher/patches/v0.15.0/iam-inline-policies/var_use_managed_iam_policies.sh","sha":"05759e303d383f1c099461c222dcd4e07f3f112b"}]}]},{"name":"v0.16.0","children":[{"name":"cloudwatch-log-group","children":[{"name":"manage_cloudwatch_log_group.sh","path":".patcher/patches/v0.16.0/cloudwatch-log-group/manage_cloudwatch_log_group.sh","sha":"847a5ffd0367de63aa0117b76f404dc7aa3e2ac8"},{"name":"patch.yaml","path":".patcher/patches/v0.16.0/cloudwatch-log-group/patch.yaml","sha":"1aee46f3fada174473c3249aac05156159ac76de"}]}]},{"name":"v0.17.0","children":[{"name":"terraform-1.1-upgrade","children":[{"name":"bump_required_version.sh","path":".patcher/patches/v0.17.0/terraform-1.1-upgrade/bump_required_version.sh","sha":"30abb1d075dbc85ce83dc415869de1c9c8560b0d"},{"name":"patch.yaml","path":".patcher/patches/v0.17.0/terraform-1.1-upgrade/patch.yaml","sha":"151598d0d058c97f47066847e8426c4eabb1a6dc"}]}]},{"name":"v0.18.0","children":[{"name":"fix-cloudwatch-aggregation","children":[{"name":"create-lambda-cloudwatch-fix-script.sh","path":".patcher/patches/v0.18.0/fix-cloudwatch-aggregation/create-lambda-cloudwatch-fix-script.sh","sha":"ca12646e964ea2a82e1529f6f55921ec96c25c9a"},{"name":"patch.yaml","path":".patcher/patches/v0.18.0/fix-cloudwatch-aggregation/patch.yaml","sha":"fe36a8f10342a50a21802594f1e4f9bd3c1cffce"}]}]}]}]},{"name":".pre-commit-config.yaml","path":".pre-commit-config.yaml","sha":"49ee828ed16f55335ac4dcc74331f190366b1858"},{"name":"CODEOWNERS","path":"CODEOWNERS","sha":"5f0e275ee3a38d13d1304c36d5e8640221690376"},{"name":"LICENSE.txt","path":"LICENSE.txt","sha":"f4e3d9bd4717a044ed31ad847a300eee74371a78"},{"name":"README.md","path":"README.md","sha":"925a2b1dac522baa4a8e183c9f450cab8235a19b","toggled":true},{"name":"_docs","children":[{"name":"serverless-architecture.png","path":"_docs/serverless-architecture.png","sha":"b08ab629692424a68c403f89e055e9a1d21d05b5"},{"name":"serverless-v2-architecture.png","path":"_docs/serverless-v2-architecture.png","sha":"2be3ebba1ce76e560e62701a6cd11ae98739263d"}]},{"name":"codegen","children":[{"name":"README.adoc","path":"codegen/README.adoc","sha":"56359f9b68cb3226e38c4b0e150235e6a36f4e89"},{"name":"generate-all.sh","path":"codegen/generate-all.sh","sha":"d22d323d54b0fd5de469afd77f4eea72aec8643b"},{"name":"generate-multiregion-lambda-edge-log-groups","children":[{"name":".gitignore","path":"codegen/generate-multiregion-lambda-edge-log-groups/.gitignore","sha":"bd18e1dfd67cafdb78c53dbf4b5f37397b68b4e1"},{"name":"main.go","path":"codegen/generate-multiregion-lambda-edge-log-groups/main.go","sha":"6cea15de1170b631741d4e70ef32d01a6e1f8ce8"},{"name":"static","children":[{"name":"README.md","path":"codegen/generate-multiregion-lambda-edge-log-groups/static/README.md","sha":"cae1f4f148744b5a5a3563fbce3f952bfacd78f3"},{"name":"variables.tf","path":"codegen/generate-multiregion-lambda-edge-log-groups/static/variables.tf","sha":"7e7b3a7c55723331585822672b914ffef5ffb6bb"}]},{"name":"template_data.go","path":"codegen/generate-multiregion-lambda-edge-log-groups/template_data.go","sha":"f3a8ff9d9a2e4d4a6247390ea363a83473249325"}]},{"name":"go.mod","path":"codegen/go.mod","sha":"d181d89e49c10bea44fae5ff955718541ec197ea"},{"name":"go.sum","path":"codegen/go.sum","sha":"c923680452fe274f70de1a756253399f9b78d9bf"}]},{"name":"examples","children":[{"name":"api-gateway-account-settings","children":[{"name":"README.md","path":"examples/api-gateway-account-settings/README.md","sha":"19c6f4fce86a3712b3bb3953391af98fe3ebeead"},{"name":"main.tf","path":"examples/api-gateway-account-settings/main.tf","sha":"48f5c37c72b2efb259f1be1ac10467322b8f4ae3"},{"name":"outputs.tf","path":"examples/api-gateway-account-settings/outputs.tf","sha":"0c0df614d567c6467f57640f9b12d03dbe01ace0"},{"name":"variables.tf","path":"examples/api-gateway-account-settings/variables.tf","sha":"361234e5be3ef39caad0ec4043b34871d9bf28f7"}]},{"name":"lambda-build","children":[{"name":"README.md","path":"examples/lambda-build/README.md","sha":"fe4f882634a3ab8381de4f84da8c7bb4aa894fa9"},{"name":"main.tf","path":"examples/lambda-build/main.tf","sha":"21089f9734713527881847d1205818735c0a61d0"},{"name":"outputs.tf","path":"examples/lambda-build/outputs.tf","sha":"28fc5ab8cc109b761b4697e68067f4eefc6ee0dd"},{"name":"python","children":[{"name":"Dockerfile","path":"examples/lambda-build/python/Dockerfile","sha":"9c7e1e7a83f4d13fc7ac75fc45912ad6f6f8eaa8"},{"name":"build.sh","path":"examples/lambda-build/python/build.sh","sha":"bf53f2bdde463e8bd2f1a4f93009ecb1c6c0c206"},{"name":"requirements.txt","path":"examples/lambda-build/python/requirements.txt","sha":"494619b6a805efc388aa6da5a2190809577b002a"},{"name":"src","children":[{"name":"__init.py__","path":"examples/lambda-build/python/src/__init.py__","sha":"1b58820b01935d58928ad905427bd838c5e80123"},{"name":"index.py","path":"examples/lambda-build/python/src/index.py","sha":"d0233c21dc7572caead57e7e60c8d75a13312ea0"},{"name":"test_harness.py","path":"examples/lambda-build/python/src/test_harness.py","sha":"73edf34edf789e6f57b0d8288cedb22ec9d37bc3"}]}]},{"name":"variables.tf","path":"examples/lambda-build/variables.tf","sha":"a3db97ba1c39d962d7c36064206535c618ce4083"}]},{"name":"lambda-dead-letter-queue","children":[{"name":"README.md","path":"examples/lambda-dead-letter-queue/README.md","sha":"72f39bbe39bc65a08502bc566b4806965d98460c"},{"name":"main.tf","path":"examples/lambda-dead-letter-queue/main.tf","sha":"aedda5dcf38681b193b51e46cd825eb6f8773c4d"},{"name":"outputs.tf","path":"examples/lambda-dead-letter-queue/outputs.tf","sha":"c9f9f5be8eec0260e59b908a0c64d481522e7435"},{"name":"python","children":[{"name":"index.py","path":"examples/lambda-dead-letter-queue/python/index.py","sha":"fdb82c37d271ffb7c508ea1fb9a465cc6d0cc330"}]},{"name":"variables.tf","path":"examples/lambda-dead-letter-queue/variables.tf","sha":"942b373fd87b2e4f0cdae56b12ae6e678bd88133"}]},{"name":"lambda-docker","children":[{"name":"README.md","path":"examples/lambda-docker/README.md","sha":"7726cb040c1dc4e8bc6c429dfafc7b62718b14b5"},{"name":"main.tf","path":"examples/lambda-docker/main.tf","sha":"9b817d1fa6f8b939d46f0246c02d1df03d0b51df"},{"name":"outputs.tf","path":"examples/lambda-docker/outputs.tf","sha":"fd9cf755adf2751877e57f671af1d78ae36ff598"},{"name":"secret-reflector-go","children":[{"name":"Dockerfile","path":"examples/lambda-docker/secret-reflector-go/Dockerfile","sha":"0abadc3ce47dc9796245f486610145287216148d"},{"name":"go.mod","path":"examples/lambda-docker/secret-reflector-go/go.mod","sha":"ffcb89e39347fa48257d3575137b92ac6711ade9"},{"name":"go.sum","path":"examples/lambda-docker/secret-reflector-go/go.sum","sha":"ba3f7cd243bbd46b0da1ad66499d840a92418038"},{"name":"main.go","path":"examples/lambda-docker/secret-reflector-go/main.go","sha":"e14e06f6d93b863192d9f8acea7121afc72e90a7"}]},{"name":"secret-reflector-python","children":[{"name":"Dockerfile","path":"examples/lambda-docker/secret-reflector-python/Dockerfile","sha":"13d698d74d56eddd7fa59946c6244bb5ee715b91"},{"name":"handler.py","path":"examples/lambda-docker/secret-reflector-python/handler.py","sha":"8e706c47f17f1c3f4c9a11aa45f7c0a56cc32d2a"}]},{"name":"variables.tf","path":"examples/lambda-docker/variables.tf","sha":"b005f0c886386308c4d10c6d3ca3f0c5cd434a44"}]},{"name":"lambda-edge","children":[{"name":"README.md","path":"examples/lambda-edge/README.md","sha":"7ecf6501755d2ec56e07db46941d548a0f154f66"},{"name":"main.tf","path":"examples/lambda-edge/main.tf","sha":"51c211ad9923f5bd164bd77eaca33c772996b5cd"},{"name":"nodejs","children":[{"name":"index.js","path":"examples/lambda-edge/nodejs/index.js","sha":"927b0d194260ca2517369f584a0b49513433f8e9"}]},{"name":"outputs.tf","path":"examples/lambda-edge/outputs.tf","sha":"a4bf8ccab56344ee8953866ff7b16b3f95039e00"},{"name":"providers.tf","path":"examples/lambda-edge/providers.tf","sha":"9c3a62b413dc2989022fb938f37163c7e8681c65"},{"name":"variables.tf","path":"examples/lambda-edge/variables.tf","sha":"3d51b293e9c1f76e2ee96709bb10abca503fb071"}]},{"name":"lambda-http-api-gateway","children":[{"name":"README.md","path":"examples/lambda-http-api-gateway/README.md","sha":"840459b87e0d1cc60abe0e71f82c6026ae809b5d"},{"name":"echo-text","children":[{"name":"handler.py","path":"examples/lambda-http-api-gateway/echo-text/handler.py","sha":"4c2f6a1cb20486e5cbb923f5be0cd220341cad62"}]},{"name":"main.tf","path":"examples/lambda-http-api-gateway/main.tf","sha":"6d5bf22739df1ee6981095f1cf2f08a92365cbca"},{"name":"outputs.tf","path":"examples/lambda-http-api-gateway/outputs.tf","sha":"6cc8e162e3777368e37d5bc3822032e919ef3644"},{"name":"variables.tf","path":"examples/lambda-http-api-gateway/variables.tf","sha":"e6b3b51c20f780f6808ced14029c7b5d5371b6fe"}]},{"name":"lambda-keep-warm","children":[{"name":"README.md","path":"examples/lambda-keep-warm/README.md","sha":"4ecaf10e050f8db32efe25312488a14576f823b9"},{"name":"main.tf","path":"examples/lambda-keep-warm/main.tf","sha":"d054ed521f1fca7915e16565e047d07ad2b16f8d"},{"name":"outputs.tf","path":"examples/lambda-keep-warm/outputs.tf","sha":"62a79ed810f3cde44b54d91505647e358752ff4a"},{"name":"src","children":[{"name":"index.js","path":"examples/lambda-keep-warm/src/index.js","sha":"a06e3ce1dddfe2692eeb5b2606873affc975bb76"}]},{"name":"variables.tf","path":"examples/lambda-keep-warm/variables.tf","sha":"1409b361ac77a8a5c64868de4dc06c716f2dcf66"}]},{"name":"lambda-s3-deployment-package","children":[{"name":"README.md","path":"examples/lambda-s3-deployment-package/README.md","sha":"64a77b0a6c5dba92b94fa0f4cdbcb49766591f66"},{"name":"main.tf","path":"examples/lambda-s3-deployment-package/main.tf","sha":"eebd2a55a144bfa179a2d53e47a4d93e67774774"},{"name":"outputs.tf","path":"examples/lambda-s3-deployment-package/outputs.tf","sha":"28fc5ab8cc109b761b4697e68067f4eefc6ee0dd"},{"name":"python","children":[{"name":"index.py","path":"examples/lambda-s3-deployment-package/python/index.py","sha":"eaa4418c2160ad4c4d3af22db1486792e6fee11f"},{"name":"test_harness.py","path":"examples/lambda-s3-deployment-package/python/test_harness.py","sha":"6c8f8c4c4a9ac1aedd12a5e0babae588565d22b4"}]},{"name":"variables.tf","path":"examples/lambda-s3-deployment-package/variables.tf","sha":"c21f2df459e0775158faa1dd9e86cb0666d688c4"}]},{"name":"lambda-s3","children":[{"name":"README.md","path":"examples/lambda-s3/README.md","sha":"fa6d2c51786ccf822b40d3f43cd89177c3c886ce"},{"name":"images","children":[{"name":"gruntwork-logo.png","path":"examples/lambda-s3/images/gruntwork-logo.png","sha":"a351cbef55bb12a9aa2652469416a388e9e276de"}]},{"name":"main.tf","path":"examples/lambda-s3/main.tf","sha":"c4861b9a2e052b668942ef1b7e9644f2dc562dac"},{"name":"outputs.tf","path":"examples/lambda-s3/outputs.tf","sha":"729892970d1ffc9122cef114133614945b9c7853"},{"name":"python","children":[{"name":"index.py","path":"examples/lambda-s3/python/index.py","sha":"9382fa2e2c3956f1c5ae1467de0f3942cad5bf34"},{"name":"test_harness.py","path":"examples/lambda-s3/python/test_harness.py","sha":"723f97fdacc7155bac0a3d9e12715a7bd6ba6c41"}]},{"name":"variables.tf","path":"examples/lambda-s3/variables.tf","sha":"bb1631361552e9a8f5e9a1b54681eea95230afa5"}]},{"name":"lambda-service","children":[{"name":"app","children":[{"name":"app.js","path":"examples/lambda-service/app/app.js","sha":"faa4e1eef6ec837604c14a9629f6160a6e1c4b55"},{"name":"lambda.js","path":"examples/lambda-service/app/lambda.js","sha":"ee16375dac8d77ea09aed18a39bd6fdbd6aa5617"},{"name":"package-lock.json","path":"examples/lambda-service/app/package-lock.json","sha":"425494976214b885c7f476dd77c221f0fd225e0b"},{"name":"package.json","path":"examples/lambda-service/app/package.json","sha":"8919ab3dba4935812559484b86de9bb5ec26c6c8"}]},{"name":"edge","children":[{"name":"README.md","path":"examples/lambda-service/edge/README.md","sha":"c14b205d4d90fbdb6c82593d40fee332ffcde71e"},{"name":"main.tf","path":"examples/lambda-service/edge/main.tf","sha":"e71cc02e59e42c36215eeff7bef7ba81d5f886fb"},{"name":"outputs.tf","path":"examples/lambda-service/edge/outputs.tf","sha":"4b25a3b03b793405c471061c9846f7e72be702b2"},{"name":"variables.tf","path":"examples/lambda-service/edge/variables.tf","sha":"56a26610f6fedfa2b6a7fef86024cf210e5a13cc"}]},{"name":"path-routing-with-catchall","children":[{"name":"README.md","path":"examples/lambda-service/path-routing-with-catchall/README.md","sha":"6dadf1f59d9114ce6f772204062921b3c7d02e72"},{"name":"main.tf","path":"examples/lambda-service/path-routing-with-catchall/main.tf","sha":"5a6d2179a51de79abf71147a9004294e747b0d20"},{"name":"outputs.tf","path":"examples/lambda-service/path-routing-with-catchall/outputs.tf","sha":"372fb177a6b33e440dfa397535f7c3a687b20e11"},{"name":"variables.tf","path":"examples/lambda-service/path-routing-with-catchall/variables.tf","sha":"3cb449136019e51d4d7671fd89384832d5e09e04"}]},{"name":"path-routing","children":[{"name":"README.md","path":"examples/lambda-service/path-routing/README.md","sha":"56dca58e89d6218992af22d948d022e8ce0d3639"},{"name":"main.tf","path":"examples/lambda-service/path-routing/main.tf","sha":"04e650185b25cd8aa4a1f6b3569647832baeb76d"},{"name":"outputs.tf","path":"examples/lambda-service/path-routing/outputs.tf","sha":"372fb177a6b33e440dfa397535f7c3a687b20e11"},{"name":"variables.tf","path":"examples/lambda-service/path-routing/variables.tf","sha":"3cb449136019e51d4d7671fd89384832d5e09e04"}]},{"name":"private","children":[{"name":"README.md","path":"examples/lambda-service/private/README.md","sha":"f9062d14a941380af2242d86fb8ff9b1ab94d055"},{"name":"main.tf","path":"examples/lambda-service/private/main.tf","sha":"3c65d3fc7aeaa35187905535c7cc565f00a7122a"},{"name":"outputs.tf","path":"examples/lambda-service/private/outputs.tf","sha":"4b25a3b03b793405c471061c9846f7e72be702b2"},{"name":"variables.tf","path":"examples/lambda-service/private/variables.tf","sha":"e8e02beea9c0f7479bbc1b8c8b3d3f341ec36c3e"}]},{"name":"regional","children":[{"name":"README.md","path":"examples/lambda-service/regional/README.md","sha":"8d7d29aef2a233f9b207b07ce6e75b0192a84cf9"},{"name":"main.tf","path":"examples/lambda-service/regional/main.tf","sha":"c3cdcde8f572535bbc8b5affde042580a5d1fcba"},{"name":"outputs.tf","path":"examples/lambda-service/regional/outputs.tf","sha":"4b25a3b03b793405c471061c9846f7e72be702b2"},{"name":"variables.tf","path":"examples/lambda-service/regional/variables.tf","sha":"56a26610f6fedfa2b6a7fef86024cf210e5a13cc"}]}]},{"name":"lambda-vpc","children":[{"name":"README.md","path":"examples/lambda-vpc/README.md","sha":"06061feff46330251b227af179d79d2d78dfde3c"},{"name":"javascript","children":[{"name":"index.js","path":"examples/lambda-vpc/javascript/index.js","sha":"1c4d37c47144c12acaa1306952c6e8512b201744"}]},{"name":"main.tf","path":"examples/lambda-vpc/main.tf","sha":"a524dfee1c6a1a172726f8bbeeba508d0192b4b6"},{"name":"outputs.tf","path":"examples/lambda-vpc/outputs.tf","sha":"eb9cbc764168459df0fa63742281ef87b5919f2e"},{"name":"variables.tf","path":"examples/lambda-vpc/variables.tf","sha":"17ee714bfd63e99dc13f625e88cca231e4e47a78"}]},{"name":"scheduled-lambda-job","children":[{"name":"README.md","path":"examples/scheduled-lambda-job/README.md","sha":"d106b5f0e85f490b4c232d5f9cb943fbca266fcc"},{"name":"javascript","children":[{"name":"index.js","path":"examples/scheduled-lambda-job/javascript/index.js","sha":"92e0906a7d45397aedbda160a61f50321f7c23e4"}]},{"name":"main.tf","path":"examples/scheduled-lambda-job/main.tf","sha":"3aa7f649b1e20d9ff51d6fccaf0db0c8f2912b63"},{"name":"outputs.tf","path":"examples/scheduled-lambda-job/outputs.tf","sha":"eb9cbc764168459df0fa63742281ef87b5919f2e"},{"name":"variables.tf","path":"examples/scheduled-lambda-job/variables.tf","sha":"d3a08b377cc2cb908fb23af423b1700b19e3a684"}]}]},{"name":"modules","children":[{"name":"api-gateway-account-settings","children":[{"name":"README.md","path":"modules/api-gateway-account-settings/README.md","sha":"ca40e9ffc898348824ab3b183bb23a497860c58e"},{"name":"account-settings.png","path":"modules/api-gateway-account-settings/account-settings.png","sha":"f9e573d320f6d6f0ad0748e0d406589f38d54bd1"},{"name":"main.tf","path":"modules/api-gateway-account-settings/main.tf","sha":"5badc40d247ec091544034db4a5e5aa9aee7fa1f"},{"name":"outputs.tf","path":"modules/api-gateway-account-settings/outputs.tf","sha":"ebfd7c838ab30a445df0481c4571ebde61747be0"},{"name":"variables.tf","path":"modules/api-gateway-account-settings/variables.tf","sha":"4f1a17e06927e9251e01ff8ab318b06c83371bd2"}]},{"name":"api-gateway-proxy-methods","children":[{"name":"README.md","path":"modules/api-gateway-proxy-methods/README.md","sha":"e7438397d279ced3af56c11c78d241bb0ff6dedf"},{"name":"main.tf","path":"modules/api-gateway-proxy-methods/main.tf","sha":"80a016f8598790a77dd8b99f5e32c62e747a4b81"},{"name":"outputs.tf","path":"modules/api-gateway-proxy-methods/outputs.tf","sha":"c09e327abb5ba52aa563199f254ec54ee368c647"},{"name":"variables.tf","path":"modules/api-gateway-proxy-methods/variables.tf","sha":"831b1015342bdff3e4567b7b7d52c099981873b9"}]},{"name":"api-gateway-proxy","children":[{"name":"README.md","path":"modules/api-gateway-proxy/README.md","sha":"90399bb539a78ebd32de19b9f134d0d88bfadcf4"},{"name":"core-concepts.md","path":"modules/api-gateway-proxy/core-concepts.md","sha":"4400e3a78f955b119662d9e809b30fde52967f0b"},{"name":"main.tf","path":"modules/api-gateway-proxy/main.tf","sha":"f5f3123a450ab27b785e8bc721b18dc1ff8a0e0f"},{"name":"outputs.tf","path":"modules/api-gateway-proxy/outputs.tf","sha":"ceb7718363eaa90c50c910967e3a273689ea4a2b"},{"name":"variables.tf","path":"modules/api-gateway-proxy/variables.tf","sha":"67a3af9c07815f027a869ce2e4991f0e52346832"}]},{"name":"keep-warm","children":[{"name":"README.md","path":"modules/keep-warm/README.md","sha":"1285d2927ca0614e0b4725ca6185629820e98488"},{"name":"main.tf","path":"modules/keep-warm/main.tf","sha":"e0017ef14aab07789a94fba1f9920c3adb5083a3"},{"name":"outputs.tf","path":"modules/keep-warm/outputs.tf","sha":"5fc4667c38e2694986e16b9808e9957ec0ad5d5b"},{"name":"src","children":[{"name":"index.js","path":"modules/keep-warm/src/index.js","sha":"16c923525b669ef04cfb039349ad6dd906720caa"}]},{"name":"variables.tf","path":"modules/keep-warm/variables.tf","sha":"0ab3e1387cc0f345a10b8d8b6a5f09d540337bb9"}]},{"name":"lambda-edge-log-group","children":[{"name":"README.md","path":"modules/lambda-edge-log-group/README.md","sha":"08f2155c6532fef5c8623afc6c05422bd7b245fc"},{"name":"main.tf","path":"modules/lambda-edge-log-group/main.tf","sha":"197cfe5f8224c1ced1e53d5b37b2fb07ea84de7b"},{"name":"outputs.tf","path":"modules/lambda-edge-log-group/outputs.tf","sha":"8fd18267ef3b451d7c1e31294b9d607cddc67cbb"},{"name":"variables.tf","path":"modules/lambda-edge-log-group/variables.tf","sha":"48346e3e00f6bb88bd17865b155f9c094eb4921d"}]},{"name":"lambda-edge-multi-region-log-groups","children":[{"name":"README.md","path":"modules/lambda-edge-multi-region-log-groups/README.md","sha":"b426a7c07d2ab1b7632239629713fb9649a8540c"},{"name":"main.tf","path":"modules/lambda-edge-multi-region-log-groups/main.tf","sha":"2ed7742033a3ed3873222fd4a550f552b44c1c54"},{"name":"outputs.tf","path":"modules/lambda-edge-multi-region-log-groups/outputs.tf","sha":"2ba9b4ae50dfd245b3837dd9fe91191d99ada851"},{"name":"variables.autogen.tf","path":"modules/lambda-edge-multi-region-log-groups/variables.autogen.tf","sha":"d052c298686be4693fe259e39ddadb09bd65a613"},{"name":"variables.tf","path":"modules/lambda-edge-multi-region-log-groups/variables.tf","sha":"7e7b3a7c55723331585822672b914ffef5ffb6bb"}]},{"name":"lambda-edge","children":[{"name":"README.md","path":"modules/lambda-edge/README.md","sha":"4550c1210b122a712ffaa1b41c635a2f0ea950bc"},{"name":"main.tf","path":"modules/lambda-edge/main.tf","sha":"5b001b51e0a0bd7697ece4939300ab16d5687edb"},{"name":"outputs.tf","path":"modules/lambda-edge/outputs.tf","sha":"62294b0704c9692af9d7a6b6568689287ae68913"},{"name":"variables.tf","path":"modules/lambda-edge/variables.tf","sha":"1eee4d0542d4c1031a6575557fc1c96635690088"}]},{"name":"lambda-http-api-gateway","children":[{"name":"README.md","path":"modules/lambda-http-api-gateway/README.md","sha":"224c9e1a167dfff1b20c4b4467fa452548f9a35e"},{"name":"main.tf","path":"modules/lambda-http-api-gateway/main.tf","sha":"0b411f285ff4c3e29eab38d63e191f2bf281870b"},{"name":"outputs.tf","path":"modules/lambda-http-api-gateway/outputs.tf","sha":"2231d638d272e900fa399d8304619efe55265b47"},{"name":"variables.tf","path":"modules/lambda-http-api-gateway/variables.tf","sha":"33c1e793acbf6d865a2ca3fa6451daf1a2fc10e1"}]},{"name":"lambda","children":[{"name":"README.md","path":"modules/lambda/README.md","sha":"5ba16ffa6cc082720cc71eb839f2051077f334b3"},{"name":"eni-cleanup","children":[{"name":"eni-cleanup.sh","path":"modules/lambda/eni-cleanup/eni-cleanup.sh","sha":"4046f21257cbd4d40a770776c5d6a96d1a6c5784"}]},{"name":"main.tf","path":"modules/lambda/main.tf","sha":"4df140361a4b4f3e53e247b88c16d47c9b50c0a9"},{"name":"outputs.tf","path":"modules/lambda/outputs.tf","sha":"7cce4e145c81002ea12de6239a9f27ae8ccb7c24"},{"name":"variables.tf","path":"modules/lambda/variables.tf","sha":"b6193264ee3e4bf60732051fe7623ac30d8e1a3e"}]},{"name":"run-lambda-entrypoint","children":[{"name":"README.md","path":"modules/run-lambda-entrypoint/README.md","sha":"c90ed41b9dc9f09e30efaab978aa542bc65b2210"},{"name":"go.mod","path":"modules/run-lambda-entrypoint/go.mod","sha":"7dfee2e63d9c2872a39dc75448cf90f5adbd0c22"},{"name":"go.sum","path":"modules/run-lambda-entrypoint/go.sum","sha":"2524e82c69811fb5f557166f7728e1c2de2201e4"},{"name":"install.sh","path":"modules/run-lambda-entrypoint/install.sh","sha":"5d901d594515bffac9e25ac780c0ea4fc9ffd561"},{"name":"main.go","path":"modules/run-lambda-entrypoint/main.go","sha":"57c70efca461e66c29d76a55b4fbb78788798fa1"}]},{"name":"scheduled-lambda-job","children":[{"name":"README.md","path":"modules/scheduled-lambda-job/README.md","sha":"f229fe1c35b2ca0eca42971bc8976c7a24e03aa6"},{"name":"main.tf","path":"modules/scheduled-lambda-job/main.tf","sha":"0d0a70c778c1579760f57c69c2beb28eec4ae51d"},{"name":"outputs.tf","path":"modules/scheduled-lambda-job/outputs.tf","sha":"63274208aa97eceb03826f154973e010b1e8c539"},{"name":"variables.tf","path":"modules/scheduled-lambda-job/variables.tf","sha":"30b33e21aa04c3887ba042491e4d70da83b75557"}]}]},{"name":"owners.txt","path":"owners.txt","sha":"bc3c9b6136485d9fa12b39f55b2ebbdeaa03583f"},{"name":"terraform-cloud-enterprise-private-module-registry-placeholder.tf","path":"terraform-cloud-enterprise-private-module-registry-placeholder.tf","sha":"ae586c0fe830819580e1009d41a9074f16e65bed"},{"name":"test","children":[{"name":"README.md","path":"test/README.md","sha":"f798bda8aed01240778826ec33d91a059f52acde"},{"name":"api_gateway_account_settings_test.go","path":"test/api_gateway_account_settings_test.go","sha":"4cbc2475fcc73a526eb35d745f187e04e7056e85"},{"name":"go.mod","path":"test/go.mod","sha":"011427c2898521fe6a4002e3eb7048d0e23ecdd1"},{"name":"go.sum","path":"test/go.sum","sha":"424b6a43b6eb52b117a5e1e85491958b7d88477a"},{"name":"gruntwork-logo.base64.txt","path":"test/gruntwork-logo.base64.txt","sha":"e94e107e3a8ea8c875a4489071137a38d279dc10"},{"name":"helpers.go","path":"test/helpers.go","sha":"0c7a49b302a6b9ee8b0bc1bd7ff8ae3826d9833e"},{"name":"lambda_build_test.go","path":"test/lambda_build_test.go","sha":"284ed155e95097334426ba6fb4f1fc669bb775c2"},{"name":"lambda_dead_letter_queue_test.go","path":"test/lambda_dead_letter_queue_test.go","sha":"3145c3ef1257c29cc9a460d69a95924fb1b2a441"},{"name":"lambda_docker_test.go","path":"test/lambda_docker_test.go","sha":"2e1fca344043531bddc05ddebaf3216a29748d04"},{"name":"lambda_edge_test.go","path":"test/lambda_edge_test.go","sha":"6e777042e0c03f61f72ea46bbd902bfd504d9d0e"},{"name":"lambda_http_api_gateway_test.go","path":"test/lambda_http_api_gateway_test.go","sha":"74af3105ac41d053ffeea68c85d6c0491a2d7eeb"},{"name":"lambda_keep_warm_test.go","path":"test/lambda_keep_warm_test.go","sha":"fd12a95c34a62e99586a48c1aa3df161feb3e27a"},{"name":"lambda_s3_deployment_package_test.go","path":"test/lambda_s3_deployment_package_test.go","sha":"5a7f0de5d6f121aa3b2e33d6ad729e737da9f674"},{"name":"lambda_s3_reserved_test.go","path":"test/lambda_s3_reserved_test.go","sha":"62f81d1f78b6d10eb32e5bc2c6d5fedaf1803cf2"},{"name":"lambda_s3_test.go","path":"test/lambda_s3_test.go","sha":"e1424b983eeb51d401d17c041bc3b4e5623be77f"},{"name":"lambda_service_test.go","path":"test/lambda_service_test.go","sha":"36201cf242375fb831c017d190920b32145c1513"},{"name":"lambda_vpc_test.go","path":"test/lambda_vpc_test.go","sha":"1070caac685fc019590a90b15480f9806c20f29d"},{"name":"scheduled_lambda_job_test.go","path":"test/scheduled_lambda_job_test.go","sha":"fe5de2c46d2b3c5b88714036195e61d39ff18cbd"},{"name":"upgrades","children":[{"name":"upgrade_test.go","path":"test/upgrades/upgrade_test.go","sha":"42df9ce1677ce6de2b0fc0c9b973499ef56d6200"}]},{"name":"validation","children":[{"name":"validate_all_modules_and_examples_test.go","path":"test/validation/validate_all_modules_and_examples_test.go","sha":"918793390f1c56e1961fabfc6747054bd95089f7"}]}]}]},"detailsContent":"<h1 class=\"preview__body--title\" id=\"aws-lambda\">AWS Lambda</h1><div class=\"preview__body--border\"></div><p>This repo contains modules for deploying and managing <a href=\"https://aws.amazon.com/lambda/\" class=\"preview__body--description--blue\" target=\"_blank\">AWS Lambda</a> functions:</p>\n<ul>\n<li><a href=\"/repos/v0.21.1/package-lambda/modules/lambda\" class=\"preview__body--description--blue\">lambda</a>: A module for deploying and managing Lambda functions.</li>\n<li><a href=\"/repos/v0.21.1/package-lambda/modules/lambda-edge\" class=\"preview__body--description--blue\">lambda-edge</a>: A module for deploying and managing Lambda@Edge functions.</li>\n<li><a href=\"/repos/v0.21.1/package-lambda/modules/scheduled-lambda-job\" class=\"preview__body--description--blue\">scheduled-lambda-job</a>: A module that configures AWS to run a Lambda function on a\nperiodic basis.</li>\n</ul>\n<p>Click on each module above to see its documentation. Head over to the <a href=\"/repos/v0.21.1/package-lambda/examples\" class=\"preview__body--description--blue\">examples folder</a> for examples.</p>\n<h2 class=\"preview__body--subtitle\" id=\"what-is-a-gruntwork-module\">What is a Gruntwork module?</h2>\n<p>At <a href=\"http://www.gruntwork.io\" class=\"preview__body--description--blue\" target=\"_blank\">Gruntwork</a>, we've taken the thousands of hours we spent building infrastructure on AWS and\ncondensed all that experience and code into pre-built <strong>packages</strong> or <strong>modules</strong>. Each module is a battle-tested,\nbest-practices definition of a piece of infrastructure, such as a VPC, ECS cluster, or an Auto Scaling Group. Modules\nare versioned using <a href=\"http://semver.org/\" class=\"preview__body--description--blue\" target=\"_blank\">Semantic Versioning</a> to allow Gruntwork clients to keep up to date with the\nlatest infrastructure best practices in a systematic way.</p>\n<h2 class=\"preview__body--subtitle\" id=\"how-do-you-use-a-module\">How do you use a module?</h2>\n<p>Most of our modules contain either:</p>\n<ol>\n<li><a href=\"https://www.terraform.io/\" class=\"preview__body--description--blue\" target=\"_blank\">Terraform</a> code</li>\n<li>Scripts & binaries</li>\n</ol>\n<h3 class=\"preview__body--subtitle\" id=\"using-a-terraform-module\">Using a Terraform Module</h3>\n<p>To use a module in your Terraform templates, create a <code>module</code> resource and set its <code>source</code> field to the Git URL of\nthis repo. You should also set the <code>ref</code> parameter so you're fixed to a specific version of this repo, as the <code>main</code>\nbranch may have backwards incompatible changes (see <a href=\"https://www.terraform.io/docs/modules/sources.html\" class=\"preview__body--description--blue\" target=\"_blank\">module\nsources</a>).</p>\n<p>For example, to use <code>v1.0.8</code> of the standalone-server module, you would add the following:</p>\n<pre><span class=\"hljs-keyword\">module</span> <span class=\"hljs-string\">\"ecs_cluster\"</span> {\n source = <span class=\"hljs-string\">\"git::git@github.com:gruntwork-io/terraform-aws-server.git//modules/standalone-server?ref=v1.0.8\"</span>\n\n <span class=\"hljs-comment\">// set the parameters for the standalone-server module</span>\n}\n</pre>\n<p><em>Note: the double slash (<code>//</code>) is intentional and required. It's part of Terraform's Git syntax (see <a href=\"https://www.terraform.io/docs/modules/sources.html\" class=\"preview__body--description--blue\" target=\"_blank\">module\nsources</a>).</em></p>\n<p>See the module's documentation and <code>variables.tf</code> file for all the parameters you can set. Run <code>terraform get -update</code> to\npull the latest version of this module from this repo before running the standard <code>terraform plan</code> and\n<code>terraform apply</code> commands.</p>\n<h3 class=\"preview__body--subtitle\" id=\"using-scripts-binaries\">Using scripts & binaries</h3>\n<p>You can install the scripts and binaries in the <code>modules</code> folder of any repo using the <a href=\"/repos/gruntwork-installer\" class=\"preview__body--description--blue\">Gruntwork\nInstaller</a>. For example, if the scripts you want to install are\nin the <code>modules/ecs-scripts</code> folder of the https://github.com/gruntwork-io/terraform-aws-ecs repo, you could install them\nas follows:</p>\n<pre><span class=\"hljs-string\">gruntwork-install </span><span class=\"hljs-built_in\">--module-name</span> <span class=\"hljs-string\">\"ecs-scripts\"</span> <span class=\"hljs-built_in\">--repo</span> <span class=\"hljs-string\">\"https://github.com/gruntwork-io/terraform-aws-ecs\"</span> <span class=\"hljs-built_in\">--tag</span> <span class=\"hljs-string\">\"0.0.1\"</span>\n</pre>\n<p>See the docs for each script & binary for detailed instructions on how to use them.</p>\n<h2 class=\"preview__body--subtitle\" id=\"developing-a-module\">Developing a module</h2>\n<h3 class=\"preview__body--subtitle\" id=\"versioning\">Versioning</h3>\n<p>We are following the principles of <a href=\"http://semver.org/\" class=\"preview__body--description--blue\" target=\"_blank\">Semantic Versioning</a>. During initial development, the major\nversion is to 0 (e.g., <code>0.x.y</code>), which indicates the code does not yet have a stable API. Once we hit <code>1.0.0</code>, we will\nfollow these rules:</p>\n<ol>\n<li>Increment the patch version for backwards-compatible bug fixes (e.g., <code>v1.0.8 -> v1.0.9</code>).</li>\n<li>Increment the minor version for new features that are backwards-compatible (e.g., <code>v1.0.8 -> 1.1.0</code>).</li>\n<li>Increment the major version for any backwards-incompatible changes (e.g. <code>1.0.8 -> 2.0.0</code>).</li>\n</ol>\n<p>The version is defined using Git tags. Use GitHub to create a release, which will have the effect of adding a git tag.</p>\n<h3 class=\"preview__body--subtitle\" id=\"tests\">Tests</h3>\n<p>See the <a href=\"/repos/v0.21.1/package-lambda/test\" class=\"preview__body--description--blue\">test</a> folder for details.</p>\n<h2 class=\"preview__body--subtitle\" id=\"license\">License</h2>\n<p>Please see <a href=\"/repos/v0.21.1/package-lambda/LICENSE.txt\" class=\"preview__body--description--blue\">LICENSE.txt</a> for details on how the code in this repo is licensed.</p>\n","repoName":"package-lambda","repoRef":"v0.21.13","serviceDescriptor":{"serviceName":"AWS Lambda","serviceRepoName":"package-lambda","serviceRepoOrg":"gruntwork-io","cloudProviders":["aws"],"description":"Deploy Lambda functions with Terraform. Supports uploading deployment packages, configuring environment variables, and scheduled functions.","imageUrl":"lambda.png","licenseType":"subscriber","technologies":["Terraform","Bash"],"compliance":[],"tags":[""]},"serviceCategoryName":"Serverless","fileName":"README.md","filePath":"","title":"Repo Browser: AWS Lambda","description":"Browse the repos in the Gruntwork Infrastructure as Code Library."}