function_name
RequiredThe name of the Lambda function
Example
function_name = my-resourceNaming Conventions
The function name must be unique within your AWS account and region. It can contain only alphanumeric characters, hyphens, and underscores. The name cannot exceed 64 characters.
Common Patterns
- Service-based:
{service}-{action}(e.g.,orders-processor) - Environment-prefixed:
{env}-{service}(e.g.,prod-api-handler) - Version-suffixed:
{name}-v{version}(e.g.,auth-handler-v2)
Best Practices
- Use lowercase with hyphens for readability
- Include the service or domain name
- Avoid generic names like
handlerorfunction - Consider including the trigger type for clarity
Full Module Example
module "lambda_function" {
source = "registry.patterneddesigns.ca/patterneddesigns/lambda-function/aws"
version = "0.1.0"
# function_name
function_name = my-resource
# Other required inputs
runtime = python3.9
handler = example-value
source_path = /path/to/resource
}