https://github.com/senora-dev/terraform-aws-lambda
This Terraform module creates and manages AWS Lambda functions with configurable runtime, handler, environment variables, and more.
https://github.com/senora-dev/terraform-aws-lambda
Last synced: 12 months ago
JSON representation
This Terraform module creates and manages AWS Lambda functions with configurable runtime, handler, environment variables, and more.
- Host: GitHub
- URL: https://github.com/senora-dev/terraform-aws-lambda
- Owner: Senora-dev
- Created: 2025-06-12T06:21:42.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-25T14:48:11.000Z (12 months ago)
- Last Synced: 2025-06-25T15:37:47.250Z (12 months ago)
- Language: HCL
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS Lambda Terraform Module
This Terraform module creates and manages AWS Lambda functions with configurable runtime, handler, environment variables, and more.
## Features
- Create Lambda functions
- Support for multiple runtimes
- Environment variables
- IAM role and policy attachment
- VPC configuration
- Dead Letter Queue (DLQ) support
- Tagging support
## Usage
```hcl
module "lambda" {
source = "Senora-dev/lambda/aws"
function_name = "my-function"
handler = "index.handler"
runtime = "nodejs18.x"
s3_bucket = "my-bucket"
s3_key = "lambda.zip"
environment = {
variables = {
ENV = "dev"
}
}
tags = {
Environment = "dev"
Terraform = "true"
}
}
```
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| function_name | Name of the Lambda function | `string` | n/a | yes |
| handler | Function entrypoint in your code | `string` | n/a | yes |
| runtime | Lambda runtime | `string` | n/a | yes |
| s3_bucket | S3 bucket storing Lambda code | `string` | n/a | yes |
| s3_key | S3 key for Lambda code | `string` | n/a | yes |
| environment | Environment variables | `map(string)` | `{}` | no |
| tags | A map of tags to add to all resources | `map(string)` | `{}` | no |
## Outputs
| Name | Description |
|------|-------------|
| lambda_function_arn | The ARN of the Lambda function |
| lambda_function_name | The name of the Lambda function |
## Maintainers
This module is maintained by [Senora.dev](https://senora.dev).