mineiros-io / terraform-aws-lambda-function

A Terraform module for deploying and managing Lambda functions on Amazon Web Services (AWS). https://aws.amazon.com/lambda/
Apache License 2.0
42 stars 24 forks source link
amazon-web-services aws function iac lambda lambda-functions mineiros serverless terraform terraform-aws terraform-modules

Build Status GitHub tag (latest SemVer) Terraform Version AWS Provider Version Join Slack

terraform-aws-lambda-function

A Terraform module for deploying and managing Serverless Lambda Functions on Amazon Web Services (AWS).

This module supports both, Terraform v1.x, v0.15, v0.14, v0.13 as well as v0.12.20 and above.

This module is part of our Infrastructure as Code (IaC) framework that enables our users and customers to easily deploy and manage reusable, secure, and production-grade cloud infrastructure.

Module Features

In contrast to the plain terraform_resource resource this module has better features. While all security features can be disabled as needed best practices are pre-configured.

These are some of our custom features:

Getting Started

Most basic usage just setting required arguments:

module "terraform-aws-lambda-function" {
  source  = "mineiros-io/lambda-function/aws"
  version = "~> 0.5.0"

  runtime  = "python3.8"
  handler  = "main"
  role_arn = aws_iam_role.lambda.arn
  filename = "deployment.zip"
}

Note: This module expects the ARN of an existing IAM Role through the role_arn variable. You can consider or terraform-aws-iam-role module for easily setting up IAM Roles.

Advanced examples can be found in examples/s3-complete-example/main.tf setting all required and optional arguments to their default values.

Module Argument Reference

See variables.tf and examples/ for details and use-cases.

Top-level Arguments

Module Configuration

Lambda Function Resource Configuration

Module Outputs

The following attributes are exported by the module:

External Documentation

AWS Lambda Documentation

Terraform AWS Provider Documentation

Module Versioning

This Module follows the principles of Semantic Versioning (SemVer).

Given a version number MAJOR.MINOR.PATCH, we increment the:

  1. MAJOR version when we make incompatible changes,
  2. MINOR version when we add functionality in a backwards compatible manner, and
  3. PATCH version when we make backwards compatible bug fixes.

Backwards compatibility in 0.0.z and 0.y.z version

About Mineiros

Mineiros is a remote-first company headquartered in Berlin, Germany that solves development, automation and security challenges in cloud infrastructure.

Our vision is to massively reduce time and overhead for teams to manage and deploy production-grade and secure cloud infrastructure.

We offer commercial support for all of our modules and encourage you to reach out if you have any questions or need help. Feel free to email us at hello@mineiros.io or join our Community Slack channel.

Reporting Issues

We use GitHub Issues to track community reported issues and missing features.

Makefile Targets

This repository comes with a handy Makefile. Run make help to see details on each available target.

License

license

This module is licensed under the Apache License Version 2.0, January 2004. Please see LICENSE for full details.

Copyright © 2020-2022 Mineiros GmbH