Skip to content

nsbno/terraform-aws-lambda

Repository files navigation

Lambda

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!

S3 Artifact Lambda

module "lambda_s3" {
  source = "github.com/nsbno/terraform-aws-lambda?ref=x.y.z"

  service_name = "get-users"

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

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

  memory = 256
}

ECR Artifact Lambda

module "lambda_ecr" {
  source = "github.com/nsbno/terraform-aws-lambda?ref=x.y.z"

  service_name = "get-users"

  artifact_type = "ecr"
  artifact      = data.vy_lambda_artifact.this

  memory = 256
}

Examples

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

A complete example with Vy provider, ECR and S3 artifact types.

Managing multiple Lambda functions in a monorepo structure.

An example with Datadog integration.

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

An example with autoscaling provisioned concurrency.

If you are using version < 2.0.0 of this module, check out this example.

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

About

Create lambda functions with best practices

Topics

Resources

Stars

Watchers

Forks

Contributors 7

Languages