Skip to main content

Lambda Function

A Lambda Function is a serverless compute resource in AWS that lets you run code without provisioning or managing servers. It executes your code only when needed and scales automatically. AWS Lambda supports various programming languages including Node.js, Python, Ruby, Java, Go, and .NET Core. For official documentation, visit AWS Lambda Docs.

Terraform Mappings:

  • aws_lambda_function.arn
  • aws_lambda_function_event_invoke_config.id
  • aws_lambda_function_url.function_arn

Supported Methods​

  • GET: Get a lambda function by name
  • LIST: List all lambda functions
  • SEARCH: Search for lambda functions by ARN

iam-role​

Lambda functions require execution roles to manage permissions. An IAM Role is linked to Lambda to grant the necessary permissions for accessing other AWS services and resources.

s3-bucket​

Lambda functions can be triggered by S3 events, such as when a file is uploaded. They can also interact with S3 buckets to store or retrieve data.

sns-topic​

A Lambda function can subscribe to an SNS Topic to process messages published to the topic asynchronously, allowing for decoupled and distributed systems.

sqs-queue​

Lambda can poll messages from an SQS queue and process them. This is useful for handling tasks asynchronously at scale.

lambda-function​

Lambda functions can trigger other Lambda functions to create complex workflows or process parallel tasks.

elbv2-target-group​

Lambda functions can be registered as targets within an Application Load Balancer (ALB) target group, allowing HTTP and HTTPS requests to trigger functions directly via ALB listeners.