An open API service indexing awesome lists of open source software.

https://github.com/osodevops/aws-terraform-module-lambda-at-edge

A terraform module for deploying Lambda@Edge function in terraform
https://github.com/osodevops/aws-terraform-module-lambda-at-edge

Last synced: 1 day ago
JSON representation

A terraform module for deploying Lambda@Edge function in terraform

Awesome Lists containing this project

README

          

# AWS Lambda@Edge Cloudfront deployment

[![README Header][readme_header_img]][readme_header_link]

This module supports any type of Lambda Function supported by Edge, including NodeJs and Python functions.

---

## Usage

[Lambda@Edge](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-at-the-edge.html) is an extension of AWS Lambda, a compute service that lets you execute functions that customize the content that CloudFront delivers.
### Requirements
You must use a versioned S3 bucket for your deployment artifacts

## Examples

You just point it at a set of local file globs and it handles bundling your code and deploying it.
```hcl
module "security_header_lambda" {
source = "it::ssh://git@github.com/aws-terraform-module-lambda-at-edge.git"
function_name = "security_headers"
environment = "p"
description = "Adds security headers to the response"
lambda_runtime = "nodejs12.x"
s3_artifact_bucket_name = "lambda-edge-us-east-1-bucket-app"
lambda_code_source_dir = "./scripts/security_headers" # script from AWS blog below
common_tags = var.common_tags
}
```

## Related Projects

Check out these related projects.

- [Adding HTTP Security Headers Using Lambda@Edge and Amazon CloudFront](https://aws.amazon.com/blogs/networking-and-content-delivery/adding-http-security-headers-using-lambdaedge-and-amazon-cloudfront/) - This module can be used to append HTTP request headers as shown in the AWS example

## Need some help

File a GitHub [issue](https://github.com/osodevops/aws-terraform-module-lambda-at-edge/issues), send us an [email][email] or [tweet us][twitter].

## The legals

Copyright © 2017-2025 [OSO](https://oso.sh) | See [LICENCE](LICENSE) for full details.

[OSO who we are](https://oso.sh/who-we-are/)

## Who we are

We at [OSO][website] help teams to adopt emerging technologies and solutions to boost their competitiveness, operational excellence and introduce meaningful innovations that drive real business growth. Our developer-first culture, combined with our cross-industry experience and battle-tested delivery methods allow us to implement the most impactful solutions for your business.

Looking for support applying emerging technologies in your business? We’d love to hear from you, get in touch by [email][email]

Start adopting new technologies by checking out [our other projects][github], [follow us on twitter][twitter], [join our team of leaders and challengers][careers], or [contact us][contact] to find the right technology to support your business.[![Beacon][beacon]][website]

[logo]: https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-logo-green.png
[website]: https://oso.sh?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=website
[github]: https://github.com/osodevops?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=github
[careers]: https://oso.sh/careers/?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=careers
[contact]: https://oso.sh/contact/?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=contact
[linkedin]: https://www.linkedin.com/company/oso-devops?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=linkedin
[twitter]: https://twitter.com/osodevops?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=twitter
[email]: mailto:enquiries@oso.sh?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=email
[readme_header_img]: https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-animation.gif
[readme_header_link]: https://oso.sh/what-we-do/?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=readme_header_link
[beacon]: https://github-analyics.ew.r.appspot.com/G-WV0Q3HYW08/osodevops/aws-terraform-module-lambda-at-edge?pixel&cs=github&cm=readme&an=aws-terraform-module-lambda-at-edge