Skip to content

nsbno/terraform-aws-lambda

Repository files navigation

Lambda

Create serverless applications with Lambda

Integration Modules

This module has sub-modules to make integration with other AWS services easier.

SQS

This module allows you to trigger your Lambda with SQS queues.

API Gateway v2

This module allows you to trigger your Lambda with API Gateway v2

Usage

Remember to check out the variables and outputs to see all options.

Important
This module uses lambda aliases. Remember to use the function_qualifier instead of using the function_name to reference the lambda!
module "lambda" {
  source = "github.com/nsbno/terraform-aws-lambda?ref=x.y.z"

  name = "get-users"

  artifact_type = "s3"
  artifact      = data.vy_artifact_info.this

  runtime = "python3.11"
  handler = "handler.main"

  memory = 256
}

Examples

These examples show you how to use this module in different configurations.

SQS

This example shows a Lambda that is triggered by an SQS queue.

Provisioned Concurrency

An example with autoscaling provisioned concurrency.