AWS SQS 批量大小和消息

AWS SQS Batch size and messages

我正在使用 AWS SQS 和 Lambda。我想知道如果 batchsize = 5 和 sqs 消息 left = 3.

Lambda 会被一批 3 条消息触发,还是 sqs 会等待消息计数变为 5 条?

来自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.

因此,基于此,您应该会收到 3 条消息。 Lambda 不应等待 5.