Code Monkey home page Code Monkey logo

terraform-module-aws-lambda's Introduction

AWS Lambda

This module creates a set of AWS Lambda resources including the packaging of function code.

  • AWS Lambda function
  • AWS Lambda IAM role
  • (optional) SSM IAM policy to allow the function access to a specified set of SSM parameters
  • (optional) KMS IAM policy to allow the function access to the KMS key used for decryption
  • (optional) VPC attachment IAM policy to allow the function access to VPC resources
  • (optional) Adds X-Ray write only policy if tracing is enabled

Variables

Name Description Type Default Required
assume_role_policy_principles Princliples which can assume the lambdas role. list(string)
[
"lambda.amazonaws.com",
"edgelambda.amazonaws.com"
]
no
cloudwatch_kms_key_arn The ARN of the KMS Key to use when encrypting log data string null no
cloudwatch_retention_in_days The number of days you want to retain log events in lambda's log group number 14 no
description A description of the lambda function. any n/a yes
disable_label_function_name_prefix Indicates if prefixing of the lambda function name should be disabled. Defaults to false bool false no
enable_cloudwatch_logs Enable cloudwatch logs bool true no
enable_tracing Enable tracing of requests. If tracing is enabled, tracing mode needs to be specified. bool false no
environment_variables Environment variables map(string) {} no
external_lambda_hash n/a string "" no
function_name A unique name for the lambda function. string n/a yes
handler The function entrypoint. string n/a yes
include_region If set to true the current providers region will be appended to any global AWS resources such as IAM roles bool false no
kms_key_arn KMS key used for decryption string "" no
lambda_code_dir A directory containing the code that needs to be packaged. string "src" no
memory_size Amount of memory in MB your Lambda Function can use at runtime string "128" no
name n/a string "function" no
namespace n/a string n/a yes
publish_lambda Whether to publish creation/change as new Lambda Function Version. bool false no
reserved_concurrent_executions The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations. number -1 no
runtime The runtime environment for the Lambda function. Valid Values: nodejs10.x | nodejs12.x | java8 | java11 | python2.7 | python3.6 | python3.7 | python3.8 | dotnetcore2.1 | dotnetcore3.1 | go1.x | ruby2.5 | ruby2.7 | provided string n/a yes
ssm_parameter_names Names of SSM parameters that lambda will be able to access list(string) [] no
stage n/a string n/a yes
tags n/a map(string) n/a yes
timeout timeout any n/a yes
tracing_mode Required if tracing is enabled. Possible values: PassThrough or Active. See https://www.terraform.io/docs/providers/aws/r/lambda_function.html#mode string null no
vpc_security_group_ids Allows the function to access VPC (if both 'subnet_ids' and 'security_group_ids' are empty then vpc_config is considered to be empty or unset, see https://docs.aws.amazon.com/lambda/latest/dg/vpc.html for details). list(string) [] no
vpc_subnet_ids Allows the function to access VPC subnets (if both 'subnet_ids' and 'security_group_ids' are empty then vpc_config is considered to be empty or unset, see https://docs.aws.amazon.com/lambda/latest/dg/vpc.html for details). list(string) [] no

Outputs

Name Description
lambda_name The name of the Lambda Function
lambda_arn The ARN of the Lambda Function
lambda_invoke_arn The Invoke ARN of the Lambda Function
lambda_qualified_arn The ARN identifying lambda function version
lambda_version Latest published version of lambda function
lambda_last_modified The date lambda function resource was last modified
lambda_kms_key_arn The ARN for the KMS encryption key of lambda function
lambda_source_code_hash Base64-encoded representation of raw SHA-256 sum of the zip file
lambda_source_code_size The size in bytes of the function .zip file
lambda_role_arn The ARN of the IAM role created for the lambda function
lambda_role_name The name of the IAM role created for the lambda function
cloudwatch_log_group_arn The ARN of the cloudwatch log group

terraform-module-aws-lambda's People

Contributors

ljiljanaholden avatar semantic-release-bot avatar adaptazbysek avatar avst-dmartino avatar tbatagiannis1 avatar mtamiola-priv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.