AWS Messaging 0.13.0Last updated in version 0.13.0
View Source
Release Notes
Simple Queuing Service (SQS) To Lambda Connection Module
This module wraps the basics for using SQS to trigger a Lambda for processing
Sample Usage
- Terraform
- Terragrunt
main.tf
# ------------------------------------------------------------------------------------------------------
# DEPLOY GRUNTWORK'S SQS-LAMBDA-CONNECTION MODULE
# ------------------------------------------------------------------------------------------------------
module "sqs_lambda_connection" {
source = "git::git@github.com:gruntwork-io/terraform-aws-messaging.git//modules/sqs-lambda-connection?ref=v0.13.0"
# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------
# The arn of the lambda.
lambda_arn = <string>
# The arn of the queue.
sqs_arn = <string>
# ----------------------------------------------------------------------------------------------------
# OPTIONAL VARIABLES
# ----------------------------------------------------------------------------------------------------
# The largest number of records that Lambda will retrieve from your event
# source at the time of invocation. Defaults to 10 for SQS
batch_size = 10
# The maximum amount of time to gather records before invoking the function,
# in seconds (between 0 and 300). Only available for stream sources (DynamoDB
# and Kinesis) and SQS standard queues.
maximum_batching_window_in_seconds = null
# Limits the number of concurrent instances that the Amazon SQS event source
# can invoke. Must be greater than or equal to 2.
maximum_concurrency = null
}
terragrunt.hcl
# ------------------------------------------------------------------------------------------------------
# DEPLOY GRUNTWORK'S SQS-LAMBDA-CONNECTION MODULE
# ------------------------------------------------------------------------------------------------------
terraform {
source = "git::git@github.com:gruntwork-io/terraform-aws-messaging.git//modules/sqs-lambda-connection?ref=v0.13.0"
}
inputs = {
# ----------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# ----------------------------------------------------------------------------------------------------
# The arn of the lambda.
lambda_arn = <string>
# The arn of the queue.
sqs_arn = <string>
# ----------------------------------------------------------------------------------------------------
# OPTIONAL VARIABLES
# ----------------------------------------------------------------------------------------------------
# The largest number of records that Lambda will retrieve from your event
# source at the time of invocation. Defaults to 10 for SQS
batch_size = 10
# The maximum amount of time to gather records before invoking the function,
# in seconds (between 0 and 300). Only available for stream sources (DynamoDB
# and Kinesis) and SQS standard queues.
maximum_batching_window_in_seconds = null
# Limits the number of concurrent instances that the Amazon SQS event source
# can invoke. Must be greater than or equal to 2.
maximum_concurrency = null
}
Reference
- Inputs
- Outputs
Required
lambda_arn
stringThe arn of the lambda.
sqs_arn
stringThe arn of the queue.
Optional
batch_size
numberThe largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 10 for SQS
10
The maximum amount of time to gather records before invoking the function, in seconds (between 0 and 300). Only available for stream sources (DynamoDB and Kinesis) and SQS standard queues.
null
maximum_concurrency
numberLimits the number of concurrent instances that the Amazon SQS event source can invoke. Must be greater than or equal to 2.
null