1 Answer
- Newest
- Most votes
- Most comments
0
Hi,
The AWS Lambda function can be triggered with multiple messages from the Amazon SQS queue (unless the Batch Size is set to zero in the Trigger configuration).
The Lambda function should loop through each record that is passed in the event parameter, for example:
exports.handler = async function(event, context) {
event.Records.forEach(record => {
const { body } = record;
console.log(body);
});
return {};
}
So, is Batch Size set to 0 in your case? See https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html for details about batch size
Best,
Didier
Hi, Batch size is set to 1, hence we dont need loop in our consumer lambda.
Relevant content
- asked 9 months ago
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 3 months ago
Could you give your Lambda Function concurrency and Unreserved account concurrency limit ? You can find this information in the Configuration > Concurrency tab of your consumer Lambda