This module creates an AWS lambda and all the related resources. It is a complete re-write of our internal terraform lambda module.
Checkout examples on how to use this module for various trigger sources.
Module managed by Comtravo.
MIT Licensed. See LICENSE for full details.
| Name | Version |
|---|---|
| terraform | >= 0.13 |
| aws | ~> 3.0 |
| Name | Version |
|---|---|
| aws | ~> 3.0 |
| Name | Source | Version |
|---|---|---|
| cloudwatch-log-subscription | ./log_subscription/ | n/a |
| sqs_external | ./triggers/sqs_external/ | n/a |
| triggered-by-api-gateway | ./triggers/api_gateway/ | n/a |
| triggered-by-cloudwatch-event-schedule | ./triggers/cloudwatch_event_schedule/ | n/a |
| triggered-by-cloudwatch-event-trigger | ./triggers/cloudwatch_event_trigger/ | n/a |
| triggered-by-cloudwatch-logs | ./triggers/cloudwatch_logs/ | n/a |
| triggered-by-cognito-idp | ./triggers/cognito_idp/ | n/a |
| triggered-by-sqs | ./triggers/sqs/ | n/a |
| triggered-by-step-function | ./triggers/step_function/ | n/a |
| triggered_by_kinesis | ./triggers/kinesis/ | n/a |
| Name | Type |
|---|---|
| aws_cloudwatch_log_group.lambda | resource |
| aws_lambda_function.lambda | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| cloudwatch_log_retention | Enable Cloudwatch logs retention | number |
90 |
no |
| cloudwatch_log_subscription | Cloudwatch log stream configuration | object({ |
{ |
no |
| description | Lambda function description | string |
"Managed by Terraform" |
no |
| environment | Lambda environment variables | map(string) |
null |
no |
| file_name | Lambda function filename name | string |
null |
no |
| function_name | Lambda function name | string |
n/a | yes |
| handler | Lambda function handler | string |
null |
no |
| image_config | Container image configuration values that override the values in the container image Dockerfile. | object({ |
null |
no |
| image_uri | ECR image URI containing the function's deployment package | string |
null |
no |
| kinesis_configuration | https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_event_source_mapping | map(object({ |
{} |
no |
| layers | List of layers for this lambda function | list(string) |
[] |
no |
| memory_size | Lambda function memory size | number |
128 |
no |
| publish | Publish lambda function | bool |
false |
no |
| region | AWS region | string |
n/a | yes |
| reserved_concurrent_executions | Reserved concurrent executions for this lambda function | number |
-1 |
no |
| role | Lambda function role | string |
n/a | yes |
| runtime | Lambda function runtime | string |
"nodejs14.x" |
no |
| s3_bucket | S3 bucket name where lambda package is stored | string |
null |
no |
| s3_key | S3 key where lambda package is stored | string |
null |
no |
| s3_object_version | S3 object version of the lambda package | string |
null |
no |
| sqs_external | External SQS to consume | object({ |
null |
no |
| tags | Tags for this lambda function | map(string) |
{} |
no |
| timeout | Lambda function runtime | number |
300 |
no |
| tracing_config | https://www.terraform.io/docs/providers/aws/r/lambda_function.html | object({ |
{ |
no |
| trigger | Trigger configuration for this lambda function | any |
n/a | yes |
| vpc_config | Lambda VPC configuration | object({ |
{ |
no |
| Name | Description |
|---|---|
| arn | AWS lambda arn |
| aws_lambda_function | AWS lambda attributes |
| dlq | AWS lambda Dead Letter Queue details |
| function_name | AWS lambda function name |
| invoke_arn | AWS lambda invoke_arn |
| qualified_arn | AWS lambda qualified_arn |
| queue | AWS lambda SQS details |
| sns_topics | AWS lambda SNS topics if any |
| version | AWS lambda version |