|
1 |
| -[<img src="./img/oso_banner.gif/>](https://osodevops.io) |
2 | 1 |
|
3 |
| -# aws-terraform-module-lambda-at-edge |
4 |
| -A terraform module for deploying Lambda@Edge function in terraform |
| 2 | +<!-- markdownlint-disable --> |
| 3 | +# AWS Lambda@Edge Cloudfront deployment |
| 4 | + |
| 5 | + |
| 6 | +<!-- markdownlint-restore --> |
| 7 | + |
| 8 | +[![README Header][readme_header_img]][readme_header_link] |
| 9 | + |
| 10 | +<!-- |
| 11 | +
|
| 12 | +
|
| 13 | +
|
| 14 | +
|
| 15 | + ** DO NOT EDIT THIS FILE |
| 16 | + ** |
| 17 | + ** This file was automatically generated by the `build-harness`. |
| 18 | + ** 1) Make all changes to `README.yaml` |
| 19 | + ** 2) Run `make init` (you only need to do this once) |
| 20 | + ** 3) Run`make readme` to rebuild this file. |
| 21 | + ** |
| 22 | + ** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.) |
| 23 | + ** |
| 24 | +
|
| 25 | +
|
| 26 | +
|
| 27 | +
|
| 28 | +
|
| 29 | +--> |
| 30 | +This module supports any type of Lambda Function supported by Edge, including NodeJs and Python functions. |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +## Usage |
| 40 | + |
| 41 | +[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. |
| 42 | +### Requirements |
| 43 | +You must use a versioned S3 bucket for your deployment artifacts |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +## Examples |
| 49 | + |
| 50 | +You just point it at a set of local file globs and it handles bundling your code and deploying it. |
| 51 | +```hcl |
| 52 | + module "security_header_lambda" { |
| 53 | + source = "it::ssh://[email protected]/aws-terraform-module-lambda-at-edge.git" |
| 54 | + function_name = "security_headers" |
| 55 | + environment = "p" |
| 56 | + description = "Adds security headers to the response" |
| 57 | + lambda_runtime = "nodejs12.x" |
| 58 | + s3_artifact_bucket_name = "lambda-edge-us-east-1-bucket-app" |
| 59 | + lambda_code_source_dir = "./scripts/security_headers" # script from AWS blog below |
| 60 | + common_tags = var.common_tags |
| 61 | + } |
| 62 | +``` |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +## Related Projects |
| 69 | + |
| 70 | +Check out these related projects. |
| 71 | + |
| 72 | +- [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 |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | +## Need some help |
| 77 | + |
| 78 | +File a GitHub [issue](https://github.com/osodevops/aws-terraform-module-lambda-at-edge/issues), send us an [email][email] or [tweet us][twitter]. |
| 79 | + |
| 80 | +## The legals |
| 81 | + |
| 82 | +Copyright © 2017-2021 [OSO](https://oso.sh) | See [LICENCE](LICENSE) for full details. |
| 83 | + |
| 84 | +[<img src="https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-logo-green.png" alt="OSO who we are" width="250"/>](https://oso.sh/who-we-are/) |
| 85 | + |
| 86 | +## Who we are |
| 87 | + |
| 88 | +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. |
| 89 | + |
| 90 | +Looking for support applying emerging technologies in your business? We’d love to hear from you, get in touch by [email][email] |
| 91 | + |
| 92 | +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] |
| 93 | + |
| 94 | + [logo]: https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-logo-green.png |
| 95 | + [website]: https://oso.sh?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=website |
| 96 | + [github]: https://github.com/osodevops?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=github |
| 97 | + [careers]: https://oso.sh/careers/?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=careers |
| 98 | + [contact]: https://oso.sh/contact/?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=contact |
| 99 | + [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 |
| 100 | + [twitter]: https://twitter.com/osodevops?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=twitter |
| 101 | + [email]: mailto:[email protected]?utm_source=github&utm_medium=readme&utm_campaign=osodevops/aws-terraform-module-lambda-at-edge&utm_content=email |
| 102 | + [readme_header_img]: https://oso-public-resources.s3.eu-west-1.amazonaws.com/oso-animation.gif |
| 103 | + [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 |
| 104 | + [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 |
0 commit comments