Skip to content

pbs-common/terraform-aws-lambda-event-source-mapping-module

Repository files navigation

PBS TF Lambda Event Source Mapping Module

Installation

Using the Repo Source

Use this URL for the source of the module. See the usage examples below for more details.

github.com/pbs/terraform-aws-lambda-event-source-mapping-module?ref=0.1.16

Alternative Installation Methods

More information can be found on these install methods and more in the documentation here.

Usage

Creates a Lambda event source mapping.

Integrate this module like so:

module "lambda_event_source_mapping" {
  source = "github.com/pbs/terraform-aws-lambda-event-source-mapping-module?ref=0.1.16"

  function_name    = module.lambda.arn
  event_source_arn = module.queue.arn

  # Optional Parameters
}

For example, this would be how to use this module to create a Lambda event source mapping for a Lambda function that is triggered by an SQS queue:

module "lambda_event_source_mapping" {
  source = "../.."

  function_name    = module.lambda.arn
  event_source_arn = module.queue.arn

  batch_size = 1

  scaling_config = {
    maximum_concurrency = 10
  }
}

Adding This Version of the Module

If this repo is added as a subtree, then the version of the module should be close to the version shown here:

0.1.16

Note, however that subtrees can be altered as desired within repositories.

Further documentation on usage can be found here.

Below is automatically generated documentation on this Terraform module using terraform-docs


Requirements

Name Version
terraform >= 1.3.2
aws >= 4.5.0

Providers

Name Version
aws 5.24.0

Modules

No modules.

Resources

Name Type
aws_lambda_event_source_mapping.mapping resource

Inputs

Name Description Type Default Required
function_name The name or the ARN of the Lambda function that will be subscribing to events. string n/a yes
batch_size The largest number of records that Lambda will retrieve from your event source at the time of invocation. Defaults to 100 for DynamoDB, Kinesis, MQ and MSK, 10 for SQS. number null no
event_source_arn The event source ARN - this is required for Kinesis stream, DynamoDB stream, SQS queue, MQ broker or MSK cluster. It is incompatible with a Self Managed Kafka source. string null no
function_response_types A list of current response type enums applied to the event source mapping for AWS Lambda checkpointing. Only available for SQS and stream sources (DynamoDB and Kinesis). Valid values: ReportBatchItemFailures. list(string) null no
scaling_config Scaling configuration of the event source. Only available for SQS queues. Detailed below.
object({
maximum_concurrency = optional(number)
})
null no

Outputs

Name Description
uuid The UUID of the created event source mapping

About

Standard PBS TF Lambda Event Source Module

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •