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.16More information can be found on these install methods and more in the documentation here.
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
}
}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
| Name | Version |
|---|---|
| terraform | >= 1.3.2 |
| aws | >= 4.5.0 |
| Name | Version |
|---|---|
| aws | 5.24.0 |
No modules.
| Name | Type |
|---|---|
| aws_lambda_event_source_mapping.mapping | resource |
| 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({ |
null |
no |
| Name | Description |
|---|---|
| uuid | The UUID of the created event source mapping |