lambda-with-inline-code

babbel/lambda-with-inline-code/aws

Terraform Module HCL AWS

Terraform module creating a Lambda function with inline code

Install
module "lambda-with-inline-code" {
source = "babbel/lambda-with-inline-code/aws"
version = "3.0.0"
}
plain text: /constructs/tfmod-babbel-lambda-with-inline-code-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Lambda Function with Inline Code This module creates a Lambda function, as well as its IAM role and CloudWatch Logs group with inline code, i.e. the code of the Lambda function is uploaded by Terraform. Usage ``tf module "lambda" { source = "babbel/lambda-with-inline-code/aws" version = "~> 1.2" function_name = "example" description = "This is an example" runtime = "nodejs12.x" handler = "index.handler" memory_size = 128 timeout = 3 reserved_concurrent_executions = 1 environment_variables = { NODE_ENV = "production" } source_dir = "lambda/src" } ``

Inputs (20)
NameTypeDescriptionDefault
memory_sizenumberThe amount of memory (in MB) available to the function at runtime. Increasing th required
reserved_concurrent_executionsnumberThe number of simultaneous executions to reserve for the Lambda function. required
function_namestringName of the Lambda function. required
timeoutnumberThe amount of time (in seconds) per execution before stopping it. required
descriptionstringDescription of the Lambda function. required
handlerstringThe name of the method within your code that Lambda calls to execute your functi required
runtimestringThe identifier of the Lambda function [runtime](https://docs.aws.amazon.com/lamb required
source_dirstringPath of the directory which shall be packed as code of the Lambda function. Confnull
regionstringRegion where the resource(s) will be managed. Defaults to the region set in the null
cloudwatch_log_group_retention_in_daysnumberThe number of days to retain the log of the Lambda function. 3
security_group_tagsmap(string)Map of tags assigned to the security group used by the Lambda function (if place{}
iam_role_tagsmap(string)Map of tags assigned to the IAM role used by the Lambda function created by this{}
lambda_function_tagsmap(string)Map of tags assigned to the Lambda function created by this module. Tags in this{}
secret_environment_variablesmap(string)Map of environment variable names to ARNs of AWS Secret Manager secrets. Each A{}
archive_fileobject({ output_path An instance of the `archive_file` data source containing the code of the Lambda null
cloudwatch_log_group_tagsmap(string)Map of tags assigned to the CloudWatch log group used by the Lambda function cre{}
default_tagsmap(string)Map of tags assigned to all AWS resources created by this module. {}
vpc_configobject({ subnets = list( VPC configuration of the Lambda function: * `subnets`: List of subnets in whichnull
environment_variablesmap(string)Environment variable key-value pairs. null
layerslist(string)List of up to five Lambda layer ARNs. []
Outputs (4)
this — The Lambda function.
cloudwatch_log_group — The CloudWatch Logs group the Lambda function use for its logs.
iam_role — The IAM role the Lambda function will assume.
security_group — The VPC security group the Lambda function will use if `var.vpc_config` is specified; `null` otherwi
Resources (7)
aws_cloudwatch_log_groupaws_iam_roleaws_iam_role_policyaws_lambda_functionaws_security_groupaws_security_group_rulenull_resource
Details
FrameworkTerraform Module
LanguageHCL
Version3.0.0
Cloud AWS
★ Stars7
Forks5
Total downloads12.3M
Inputs20
Outputs4
Resources7
LicenseMIT
Namespacebabbel
Updated