AWS Fundamentals Logo
AWS Fundamentals
Resource

aws_lambda_function

Manages an Lambda Function resource.

View Full Documentation on Terraform Registry

Sample HCL Configuration

A minimal configuration to get started. Refer to the Terraform Registry docs for all available arguments.

main.tf
resource "aws_lambda_function" "example" {
  # Required arguments
  function_name = "my-function"
  runtime       = "nodejs22.x"
  handler       = "index.handler"
}

Get the Lambda Cheat Sheet

Everything you need to know about Lambda on one page. HD quality, print-friendly.

Download Free Infographic