Skip to content

Commit

Permalink
Specify batch size as variable in sqs_integration module (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Endremgs authored Nov 25, 2024
1 parent 626f246 commit d183f3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/sqs_integration/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ resource "aws_lambda_event_source_mapping" "receive_amount_of_developers" {
function_name = var.lambda.function_name
event_source_arn = var.queue_arn
function_response_types = ["ReportBatchItemFailures"]
batch_size = var.batch_size
}

data "aws_iam_policy_document" "this" {
Expand Down
6 changes: 6 additions & 0 deletions modules/sqs_integration/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ variable "queue_arn" {
description = "ARN of the SQS queue"
type = string
}

variable "batch_size" {
description = "The maximum number of events to retrieve in a single batch in the lambda"
type = number
default = null
}

0 comments on commit d183f3c

Please sign in to comment.