Create serverless applications with Lambda.
Artifacts are assumed to be handled by the GitHub Actions pipeline and terraform-provider-vy.
|
Important
|
This module uses lambda aliases.
Remember to use the function_qualifier instead of using the function_name to reference the 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
}See the full S3 artifact example here.
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
}See the full ECR artifact example here.
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.
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