lambda

claranet/lambda/aws

Terraform Module HCL AWS

Terraform module for AWS Lambda functions

Install
module "lambda" {
source = "claranet/lambda/aws"
version = "1.4.0"
}
⭐ Source on GitHub 📦 Registry page
README

terraform-aws-lambda This Terraform module creates and uploads an AWS Lambda function and hides the ugly parts from you. Features Only appears in the Terraform plan when there are legitimate changes. Creates a standard IAM role and policy for CloudWatch Logs. You can add additional policies if required. Zips up a source file or directory. Installs dependencies from requirements.txt for Python functions. It only does this when necessary, not every time. Requirements Python 2.7 or higher Linux/Unix/Windows Terraform version compatibility | Module version | Terraform version | |----------------|-------------------| | 1.x.x | 0.12.x | | 0.x.x | 0.11.x | Usage ``js module "lambda" { source = "github.com/claranet/terraform-aws-lambda" function_name = "deployment-deploy-status" description = "Dep

Inputs (23)
NameTypeDescriptionDefault
policyobject({ json = string }An additional policy to attach to the Lambda function role required
reserved_concurrent_executionsnumber required
function_namestring required
source_pathstringThe absolute path to a local file or directory containing your Lambda source cod required
kms_key_arnstring required
dead_letter_configobject({ target_arn = stri required
handlerstring required
descriptionstring required
layerslist(string) required
tagsmap(string) required
environmentobject({ variables = map(s required
runtimestring required
vpc_configobject({ security_group_id required
tracing_configobject({ mode = string } required
memory_sizenumber required
trusted_entitieslist(string)Lambda function additional trusted entities for assuming roles (trust relationsh[]
build_pathslist(string)The files or directories used by the build command, to trigger new Lambda packag[ "build.py" ]
cloudwatch_logsboolSet this to false to disable logging your Lambda output to CloudWatch Logstrue
enabledboolEnable or disable the Lambda resources.true
build_commandstringThe command to run to create the Lambda package zip file"python build.py '$filename' '$runtime'
lambda_at_edgeboolSet this to true if using Lambda@Edge, to enable publishing, limit the timeout, false
publishboolfalse
timeoutnumber3
Outputs (6)
function_name — The name of the Lambda function
function_qualified_arn — The qualified ARN of the Lambda function
role_arn — The ARN of the IAM role created for the Lambda function
role_name — The name of the IAM role created for the Lambda function
function_arn — The ARN of the Lambda function
function_invoke_arn — The Invoke ARN of the Lambda function
Resources (5)
aws_iam_policyaws_iam_policy_attachmentaws_iam_roleaws_lambda_functionnull_resource
Details
FrameworkTerraform Module
LanguageHCL
Version1.4.0
Cloud AWS
★ Stars154
Forks119
Total downloads206.1k
Inputs23
Outputs6
Resources5
LicenseMIT
Namespaceclaranet
Updated