Skip to content

dntsk/terraform-aws-lambda-packager

Repository files navigation

Logo

Maintained Terraform version GitHub tag MIT license

AWS Lambda packager Terraform module

Terraform module which creates and deploy AWS Lambda with required python modules.

Supported Terraform versions

  • Terraform 0.12. Pin version to ~> v0.1

Usage with built in IAM role

module "example" {
  source  = "dntsk/lambda-packager/aws"

  source_dir = "lambda"
  filename   = "example.py"
  handler    = "example.lambda_handler"

  name = "example"

  environment_variables = {
    VAR   = "example_variable"
  }
}

Usage with custom IAM role

module "example" {
  source  = "dntsk/lambda-packager/aws"

  source_dir = "lambda"
  filename   = "example.py"
  handler    = "example.lambda_handler"

  custom_iam_role = true
  iam_role_arn    = aws_iam_role.YOUR_ROLE.arn

  name = "example"

  environment_variables = {
    VAR   = "example_variable"
  }
}

License

MIT Licensed. See LICENSE for full details.