Terraform module for versioned AWS Lambda deployments supporting both zip packages from S3 and container images from ECR.
| Name | Version |
|---|---|
| terraform | >= 1.0.0 |
| aws | >= 4.0.0 |
| Name | Version |
|---|---|
| aws | 5.98.0 |
No modules.
| Name | Type |
|---|---|
| aws_iam_role.lambda | resource |
| aws_iam_role_policy_attachment.lambda_policies | resource |
| aws_iam_role_policy_attachment.lambda_vpc_access | resource |
| aws_lambda_function.this | resource |
| aws_lambda_function_url.this | resource |
| aws_caller_identity.current | data source |
| aws_region.current | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| create_function_url | Whether to create a Function URL for HTTP access | bool |
false |
no |
| description | Description of the Lambda function | string |
null |
no |
| environment_variables | Environment variables for the Lambda function | map(string) |
{} |
no |
| file_system_config | File system configuration for the Lambda function | object({ |
null |
no |
| function_name | Name of the Lambda function | string |
n/a | yes |
| function_url_authorization_type | Authorization type for Function URL | string |
"NONE" |
no |
| function_url_cors | CORS configuration for Function URL | object({ |
null |
no |
| handler | Lambda function handler (required for zip package type) | string |
null |
no |
| image_uri | ECR image URI containing the function's deployment package (required for image package type) | string |
null |
no |
| kms_key_arn | ARN of the KMS key used to encrypt environment variables | string |
null |
no |
| memory_size | Lambda function memory size in MB | number |
128 |
no |
| package_type | Lambda deployment package type. Valid values are Zip and Image | string |
"Zip" |
no |
| policy_arns | List of IAM policy ARNs to attach to the Lambda function role | list(string) |
[] |
no |
| reserved_concurrent_executions | Number of reserved concurrent executions for the Lambda function (-1 disables) | number |
-1 |
no |
| runtime | Lambda function runtime (required for zip package type) | string |
null |
no |
| s3_bucket | S3 bucket containing the Lambda function code (required for zip package type) | string |
null |
no |
| s3_key | S3 key of the Lambda function code (required for zip package type) | string |
null |
no |
| s3_object_version | S3 object version of the Lambda function code (required for zip package type) | string |
null |
no |
| tags | Tags to apply to the Lambda function | map(string) |
{} |
no |
| timeout | Lambda function timeout in seconds | number |
3 |
no |
| tracing_config | Tracing configuration for the Lambda function | object({ |
null |
no |
| vpc_config | VPC configuration for the Lambda function | object({ |
null |
no |
| Name | Description |
|---|---|
| arn | ARN of the Lambda function |
| function_invoke_arn | Invoke ARN of the Lambda function |
| function_url | Function URL for HTTP access |
| lambda_role_arn | ARN of the Lambda IAM role |
| latest_version | Latest published version of the Lambda function |
| name | Name of the Lambda function |