---
title: "Discussion on \"3 Ways To Publish and Use an AWS Lambda Layer in Terraform\" | Hashnode"
description: "Discussion on \"3 Ways To Publish and Use an AWS Lambda Layer in Terraform\". Learn about 3 different ways to build, publish, and use an AWS Lambda layer in Terraform to include additional dependencies for your Lambda functions."
url: "https://hashnode.com/posts/3-ways-to-publish-and-use-an-aws-lambda-layer-in-terraform/65c883007d751c395f8a7436"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [3 Ways To Publish and Use an AWS Lambda Layer in Terraform](https://blog.avangards.io/3-ways-to-publish-and-use-an-aws-lambda-layer-in-terraform?utm_source=hashnode&utm_medium=feed)

Learn about 3 different ways to build, publish, and use an AWS Lambda layer in Terraform to include additional dependencies for your Lambda functions.

Feb 11, 2024 · 9 min read · blog.avangards.io  
Updated Mar 8, 2024  
Read the article

-   [#aws](https://hashnode.com/tag/aws)
-   [#aws-lambda](https://hashnode.com/tag/aws-lambda)
-   [#terraform](https://hashnode.com/tag/terraform)

## Written by

[Anthony Wat](https://hashnode.com/@acwwat)

@acwwat

  
[View profile](https://hashnode.com/@acwwat)

AWS Architect

Anthony Wat is a seasoned cloud and DevOps architect with deep expertise in software development, modernization, and automation. As a Principal Architect at Globalli, he specializes in AWS solutions, AI-driven development, and at-scale operations.

## Responses 1

Markdown supported · ⌘↵ to post

[Evan Oliver](https://hashnode.com/@evanlovescloud)

[Apr 2, 2025](https://hashnode.com/posts/3-ways-to-publish-and-use-an-aws-lambda-layer-in-terraform/65c883007d751c395f8a7436/comment/67ed75c03450ce74f9def82a)

Nice article. I did not know about the "aws\_serverlessapplicationrepository\_cloudformation\_stack" Terraform resource, that is really interesting. I couldn't find much documentation on it myself besides what was already on the Terraform registry. But the clue that you left about it using CloudFormation under the hood was helpful. Ultimately, I think preparing the layer deployment package manually is the best way and that is how I will go about it for my deployment. I do wish that the AWS sdk/cli upload limit on the deployment package size was larger than 50 MB, really limiting. For packages larger than this limit, I've just decided to create the layer from the AWS console first. Then specify the layer arn in the function's resource block.
