Terraform module designed to facilitate the creation of AWS Lambda layers.
It's 100% Open Source and licensed under the APACHE2.
IMPORTANT: The main
branch is used in source
just as an example. In your code, do not pin to main
because there may be breaking changes between releases.
Instead pin to the release tag (e.g. ?ref=tags/x.y.z
) of one of our latest releases.
module "layer" {
source = "git::https://github.com/enter-at/terraform-aws-lambda-layer.git?ref=main"
layer_name = "dependencies"
package_file = "../Pipfile"
}
module "layer" {
source = "git::https://github.com/enter-at/terraform-aws-lambda-layer.git?ref=main"
layer_name = "dependencies"
source_dir = "../src/lib"
source_type = "python"
rsync_pattern = [
"--exclude='**tests**'",
"--exclude='**__pycache__**'",
"--include=module/{a,b,c}/",
"--include='*.py'",
"--exclude='module/*'"
]
}
Name | Version |
---|---|
terraform | >= 0.13 |
Name | Version |
---|---|
archive | n/a |
aws | n/a |
null | n/a |
random | n/a |
Name | Description | Type | Default | Required |
---|---|---|---|---|
compatible_runtimes | (Optional) A list of Runtimes this layer is compatible with. Up to 5 runtimes can be specified. | list(string) |
null |
no |
description | (Optional) Description of what the Lambda layer does. | string |
null |
no |
layer_name | (Required) A unique name for the Lambda Layer. | string |
n/a | yes |
package_file | (Optional) The location of the package manager config file. Can be one of (package.json, requirements.txt, Pipfile) | string |
null |
no |
rsync_pattern | (Optional) A list of rsync pattern to include or exclude files and directories. | list(string) |
[ |
no |
source_dir | (Optional) The location of the Lamvda layer source code. Requires source_type to be defined. | string |
null |
no |
source_type | (Optional) The location of the Lambda layer source type. Can be one of (nodejs, python) | string |
null |
no |
Name | Description |
---|---|
arn | The Amazon Resource Name (ARN) of the Lambda layer with version. |
created_date | The date the layer was created. |
layer_arn | The Amazon Resource Name (ARN) of the Lambda layer without version. |
source_code_size | The size in bytes of the layer .zip file. |
version | The Lamba layer version. |
Like this project? Please give it a ★ on our GitHub!
Check out these related projects.
- terraform-aws-lambda - Terraform module designed to facilitate the creation of AWS Lambda functions.
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.
If you are interested in being a contributor and want to get involved in developing this project, we would love to hear from you!
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull Request so that we can review your changes
NOTE: Be sure to merge the latest changes from "upstream" before making a pull request!
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.