Patterned Designs HCL Module Registry
v0.1.0 latest View all versions

Terraform module for lambda-function on aws

View Full Documentation Usage guides, examples & best practices
module "lambda-function" {
  source  = "registry.patterneddesigns.ca/patterneddesigns/lambda-function/aws"
  version = "0.1.0"
}
function_name required
string

The name of the Lambda function

e.g. my-resource
Constraints
  • Function name must be 1-64 characters and contain only alphanumeric characters, hyphens, and underscores.
  • Function name must be 1-64 characters and contain only alphanumeric characters, hyphens, and underscores.
runtime required
string

Lambda runtime identifier

e.g. python3.9
Constraints
  • Runtime must be a valid AWS Lambda runtime identifier.
handler required
string

Function entrypoint in your code

e.g. example-value
source_path required
string

Path to the function source code

e.g. /path/to/resource
memory_size
number default: 128

Amount of memory in MB allocated to the function

Constraints
  • Memory size must be between 128 MB and 10240 MB.
timeout
number default: 30

Maximum execution time in seconds

Constraints
  • Timeout must be between 1 and 900 seconds.
reserved_concurrent_executions
number default: -1

Reserved concurrency limit for the function. Use -1 for no limit, 0 to disable.

Constraints
  • Reserved concurrent executions must be -1 or greater.
environment_variables
map(string) default: null

Environment variables passed to the function

e.g. {}
vpc_config
object({ subnet_ids = list(string) security_group_ids = list(string) }) default: null

VPC configuration for private network access

function_arn

ARN of the Lambda function

e.g. arn:aws:lambda:us-east-1:123456789012:function:example
function_name

Name of the Lambda function

e.g. my-lambda-function
qualified_arn

ARN with version qualifier

e.g. arn:aws:service:us-east-1:123456789012:resource
role_arn

ARN of the function's execution role

e.g. arn:aws:iam::123456789012:role/example-role
invoke_arn

ARN for invoking the function via API Gateway

e.g. arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789012:function:example/invocations