I have a reusable module for lambdas that has a dummy zip file with one dummy text file in it. I provision the lambda, permissions, cron, env, whatever it needs. Then I use GitHub Actions to actually publish the real zip file. My IAC and app code live in different repos. Answer from derekmckinnon on reddit.com
🌐
DEV Community
dev.to › chinmay13 › configuring-an-aws-lambda-function-with-lambda-layers-and-function-url-using-terraform-25a0
Configuring an AWS Lambda Function with Lambda Layers and Function URL Using Terraform - DEV Community
February 10, 2025 - By following these steps, we provisioned an AWS Lambda function using Terraform that fetches Chuck Norris jokes using the requests library. We used Lambda Layers to manage dependencies efficiently and exposed our function using a Function URL, enabling seamless HTTP access without an API Gateway.
Discussions

How do you handle Lambdas when using terraform?
I have a reusable module for lambdas that has a dummy zip file with one dummy text file in it. I provision the lambda, permissions, cron, env, whatever it needs. Then I use GitHub Actions to actually publish the real zip file. My IAC and app code live in different repos. More on reddit.com
🌐 r/aws
56
29
May 29, 2024
How to import an external lambda layer into terraform?
I’m trying to use datadog lambda layer in my lambda function to send datadog metrics: I can set this up manually from console. However, I’m not sure how to get it working in terraform. So far I have the following res… More on discuss.hashicorp.com
🌐 discuss.hashicorp.com
0
0
November 14, 2019
Terraform to create lambda layer by specify arn
I’m trying to use libre office lambda layer in my lambda function : I can set this up manually from console. However, I’m not sure how to get it working in terraform. So far I have the following resource: data “archive_file” “converttopdf_lambda” { type = “zip” source_dir = ... More on discuss.hashicorp.com
🌐 discuss.hashicorp.com
0
0
January 7, 2021
amazon web services - How to use an AWS provided lambda layer in Terraform? - Stack Overflow
I am trying to run a python function on an AWS Lambda layer, I don't find any documentation on terraform to use an AWS provided lambda layer. How do I use AWS Provided lambda layer AWSLambda-Pytho... More on stackoverflow.com
🌐 stackoverflow.com
🌐
GitHub
github.com › terraform-aws-modules › terraform-aws-lambda
GitHub - terraform-aws-modules/terraform-aws-lambda: Terraform module, which takes care of a lot of AWS Lambda/serverless tasks (build dependencies, packages, updates, deployments) in countless combinations 🇺🇦
module "lambda_function" { source = "terraform-aws-modules/lambda/aws" function_name = "lambda-with-layer" description = "My awesome lambda function" handler = "index.lambda_handler" runtime = "python3.12" publish = true source_path = "../src/lambda-function1" store_on_s3 = true s3_bucket = "my-bucket-id-with-lambda-builds" layers = [ module.lambda_layer_s3.lambda_layer_arn, ] environment_variables = { Serverless = "Terraform" } tags = { Module = "lambda-with-layer" } } module "lambda_layer_s3" { source = "terraform-aws-modules/lambda/aws" create_layer = true layer_name = "lambda-layer-s3" description = "My amazing lambda layer (deployed from S3)" compatible_runtimes = ["python3.12"] source_path = "../src/lambda-layer" store_on_s3 = true s3_bucket = "my-bucket-id-with-lambda-builds" }
Starred by 1K users
Forked by 759 users
Languages   HCL 59.8% | Python 40.2%
🌐
Medium
mahira-technology.medium.com › the-ultimate-guide-to-creating-lambda-layers-using-terraform-f64fa34b9b19
The Ultimate Guide to Creating Lambda Layers Using Terraform. | by Mahira Technology- Innovate. Transform. Thrive. | Medium
April 29, 2024 - The Ultimate Guide to Creating Lambda Layers Using Terraform. Overview :- Imagine you’ve written several Lambda functions, and they all use the same utility library or a particular SDK. Instead of …
Find elsewhere
🌐
My Devops Journal
skundunotes.com › 2024 › 09 › 29 › create-aws-lambda-layer-using-docker-terraform-and-github-actions
Create AWS Lambda Layer using Docker, Terraform and GitHub Actions – My Devops Journal
October 6, 2024 - In this use case, I am referencing two GitHub repositories. Repository#1 is aws-lambda-base-images where I executed the Docker commands and created the Docker image. Repository#2 is aws-lambda-layer-terraform where I have the Terraform code and the Python3.10 libraries to create the Lambda layer.
🌐
Avangards
blog.avangards.io › 3-ways-to-publish-and-use-an-aws-lambda-layer-in-terraform
3 Ways To Publish and Use an AWS Lambda Layer in Terraform
April 2, 2025 - In particular, AWS publishes a set of AWS SDK for pandas Lambda layers for different versions of Python. Since we are using Python 3.11, aws-sdk-pandas-layer-py3-11 is what we can use to indirectly access NumPy. ... For the full Terraform configuration of this method, refer to the 1_serverless_app_repo directory in the accompanying GitHub repository.
🌐
GitHub
github.com › enter-at › terraform-aws-lambda-layer
GitHub - enter-at/terraform-aws-lambda-layer: Terraform module designed to facilitate the creation of AWS Lambda layers
Terraform module designed to facilitate the creation of AWS Lambda layers - enter-at/terraform-aws-lambda-layer
Starred by 13 users
Forked by 14 users
Languages   HCL 56.0% | Shell 35.2% | Makefile 8.8% | HCL 56.0% | Shell 35.2% | Makefile 8.8%
🌐
GitHub
github.com › kunduso › aws-lambda-layer-terraform
GitHub - kunduso/aws-lambda-layer-terraform: This repository contains the Terraform code to create an AWS Lambda layer for Python 3 using Docker, Terraform, and GitHub Actions, promoting code reuse and simplifying dependency management across AWS Lambda functions. · GitHub
This repository contains the Terraform code to create an AWS Lambda layer for Python 3 using Docker, Terraform, and GitHub Actions, promoting code reuse and simplifying dependency management across AWS Lambda functions. - kunduso/aws-lambda-layer-terraform
Author   kunduso
🌐
Shisho Cloud
shisho.dev › dojo › providers › aws › Lambda › aws-lambda-layer-version
AWS Lambda Layer Version - Examples and best practices | Shisho Dojo
AWS Lambda Layer Version is a resource for Lambda of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
🌐
HashiCorp Discuss
discuss.hashicorp.com › terraform
How to import an external lambda layer into terraform? - Terraform - HashiCorp Discuss
November 14, 2019 - I’m trying to use datadog lambda layer in my lambda function to send datadog metrics: I can set this up manually from console. However, I’m not sure how to get it working in terraform. So far I have the following resource: resource "aws_lambda_layer_version" "datadog_layer" { layer_name = "${local.datadog_layer_name}" compatible_runtimes = ["python2.7"] } And I tried to import it with: terraform import ...
🌐
LinkedIn
linkedin.com › pulse › how-deploy-aws-lambda-function-layer-using-terraform-hendrix-roa
How to deploy an AWS Lambda function with a layer using Terraform
June 10, 2023 - To create a layer, we just need to reference the module location (could be an external registry or local machine), in my the lambda layer location is one back folder at my root directory: module "lambda_noiselesstech" { source = "../terraform-aws-lambda" // A public registry path is allowed too code_location = "./lambdas/example" filename = "example.zip" lambda_function_name = "NoiselesstechExample" lambda_runtime = "nodejs14.x" layer_arn = module.layer.arn environment_variables = { secret = "super secret value" } }
🌐
Terraform
registry.terraform.io › modules › terraform-aws-modules › lambda › aws › latest › examples › complete
terraform-aws-modules/lambda/aws | complete Example | Terraform Registry
module "lambda_example_complete" { source = "terraform-aws-modules/lambda/aws//examples/complete" version = "8.7.0" } Configuration in this directory creates AWS Lambda Function, Layers, Alias, and so on with the large variety of supported features showing this module in action.
🌐
HashiCorp Discuss
discuss.hashicorp.com › terraform
Terraform to create lambda layer by specify arn - Terraform - HashiCorp Discuss
January 7, 2021 - I’m trying to use libre office lambda layer in my lambda function : I can set this up manually from console. However, I’m not sure how to get it working in terraform. So far I have the following resource: data “archive_file” “converttopdf_lambda” { type = “zip” source_dir = “./data/converttopdf” output_path = “converttopdf.zip” } resource “aws_lambda_layer_version” “lambda_converttopdf_lambda” { layer_name = var.converttopdf_layername filename = “${data.archive_file....
🌐
Reddit
reddit.com › r/terraform › i worked on an aws + terraform project and would like to upload it to github, should i avoid uploading my lambda layers? what's best practice for showcasing my work with terraform on github?
r/Terraform on Reddit: I worked on an AWS + Terraform project and would like to upload it to Github, should I avoid uploading my Lambda layers? What's best practice for showcasing my work with Terraform on Github?
December 3, 2023 -

Sorry if this is an obtuse or otherwise dumb question, I'm trying to get as much experience as I can with AWS and Terraform and would like to showcase that professionally. I'm new to all of this and am unsure what's the best way to go about showcasing my IaC work with AWS on a Github repo.

I have two artifacts or zip files that my project on AWS uses. One is a lambda layer with my third-party dependencies and the other is my lambda function itself. Should I avoid uploading these onto Github along with other misc. Terraform files and typical .gitignore files? I would technically already have my main app file uploaded onto the project repo, so I feel having the .zip file of it would be redundant. I'm totally unaware on what to do with my lambda layer zip file. Any advice for a newbie would be great.