Ishita Kalsi
Ishita Kalsi

Reputation: 53

AWS SQS Batch size and messages

I am working with AWS SQS and Lambda. I wanted to know that if the batchsize = 5 and sqs messages left = 3.

Will the Lambda be triggered by a batch of 3 messages or will sqs wait for the message count to become 5?

Upvotes: 3

Views: 3003

Answers (1)

Marcin
Marcin

Reputation: 238051

From docs:

Batch size – The number of items to read from the queue in each batch, up to 10. The event might contain fewer items if the batch that Lambda read from the queue had fewer items.

Thus, based on this, you should get 3 messages. Lambda should not be waiting for 5.

Upvotes: 7

Related Questions