lambda-function

cloudposse/lambda-function/aws

Terraform Module HCL AWS

A module for launching Lambda Fuctions

Install
module "lambda-function" {
source = "cloudposse/lambda-function/aws"
version = "0.6.1"
}
plain text: /constructs/tfmod-cloudposse-lambda-function-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

This module deploys an AWS Lambda function from a Zip file or from a Docker image. Additionally, it creates an IAM role for the Lambda function, which optionally attaches policies to allow for CloudWatch Logs, Cloudwatch Insights, VPC Access and X-Ray tracing. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Usage For a complete example, see examples/complete. For automated tests of the complete example using bats and Terratest (which tests and deploys the example on AWS), see test. ``hcl module "lambda" { source = "cloudposse/

Inputs (50)
NameTypeDescriptionDefault
function_namestringUnique name for the Lambda Function. required
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
descriptionstringDescription of what the Lambda Function does.null
kms_key_arnstring Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key that is""
memory_sizenumberAmount of memory in MB the Lambda Function can use at runtime.128
namespacestringID element. Usually an abbreviation of your organization name, e.g. 'eg' or 'cp'null
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
permissions_boundarystringARN of the policy that is used to set the permissions boundary for the role""
role_namestringThe rolename used for the Lambda Function. If not provided, a default role name null
invoke_function_permissionslist(object({ principal =Defines which external source(s) can invoke this function (action 'lambda:Invoke[]
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
image_uristringThe ECR image URI containing the function's deployment package. Conflicts with fnull
tracing_config_modestringTracing config mode of the Lambda function. Can be either PassThrough or Active.null
reserved_concurrent_executionsnumberThe amount of reserved concurrent executions for this lambda function. A value o-1
layerslist(string)List of Lambda Layer Version ARNs (maximum of 5) to attach to the Lambda Functio[]
package_typestringThe Lambda deployment package type. Valid values are Zip and Image."Zip"
iam_policy_descriptionstringDescription of the IAM policy for the Lambda IAM role"Provides minimum SSM read permissions."
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
cloudwatch_lambda_insights_enabledboolEnable CloudWatch Lambda Insights for the Lambda Function.false
inline_iam_policystringInline policy document (JSON) to attach to the lambda rolenull
… and 10 more inputs
Outputs (7)
cloudwatch_log_group_name — Name of Cloudwatch log group
arn — ARN of the lambda function
invoke_arn — Invoke ARN of the lambda function
qualified_arn — ARN identifying your Lambda Function Version (if versioning is enabled via publish = true)
function_name — Lambda function name
role_name — Lambda IAM role name
role_arn — Lambda IAM role ARN
Resources (6)
aws_iam_policyaws_iam_roleaws_iam_role_policyaws_iam_role_policy_attachmentaws_lambda_functionaws_lambda_permission
Details
FrameworkTerraform Module
LanguageHCL
Version0.6.1
Cloud AWS
★ Stars37
Forks44
Total downloads488.4k
Inputs50
Outputs7
Resources6
Examples2
LicenseApache-2.0
Namespacecloudposse
Updated