lambda-exec

connect-group/lambda-exec/aws

Terraform Module HCL AWS

Execute a Lambda and obtain its results during a Terraform apply

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

AWS Lambda Exec Module ====================== This module will execute a Lambda function and return its result(s). It allows Lambdas to be used as a form of Data Source (via a resource) but it also allows them to perform other functions upon e.g. when destroy is called. There are some very specific constraints on how the Lambda function should work: under the hood it is using a CloudFormation "CustomResource" to execute the Lambda. Possible uses include, Advanced AMI Queries: look for an AMI but return a default if not found; Get an SSM Parameter but return a default if it is not found (see this example) Get the latest RDS Snapshot Identifier, but return an empty string if it does not exist Usage ----- If your Lambda function has inputs, pass them using the lambda_inputs map. The actual in

Inputs (6)
NameTypeDescriptionDefault
lambda_outputslist(string)List of outputs from the Lambda function. The Lambda must ALWAYS return these o required
namestringUnique name for the result of executing the lambda. required
lambda_function_arnstringLambda ARN - identify the lambda to execute. required
tagsmap(string)Any tags to add to the CloudFormation stack.{}
timeout_in_minutesstringMaximum Time to wait for a response from CloudFormation/Lambda. The Lambda itse"5"
lambda_inputsmap(string)Map of inputs which are passed into the Lambda function via the event['ResourceP{}
Outputs (1)
result — A map of results returned by the Lambda, based on the input variable 'lambda_outputs'
Resources (1)
aws_cloudformation_stack
Topics & Tags
terraformawslambda
Details
FrameworkTerraform Module
LanguageHCL
Version2.0.0
Cloud AWS
★ Stars9
Forks8
Total downloads94.6k
Inputs6
Outputs1
Resources1
Examples2
LicenseApache-2.0
Namespaceconnect-group
Updated