- Newest
- Most votes
- Most comments
It is a little difficult to predict, but I can provide some information. The Lambda service starts with 5 pollers reading from the queue using Long Polling. Each such API call can wait up to 20 seconds. This means that an empty queue will cost you: 5 pollers * 3 API calls/min * 60 minutes/hour * 24 hours/day * 30 days/month * $0.40/1,000,000 req = $0.259/month.
On top of that you will need to add the actual processing of messages. If you do not use batch, for each message you will probably get another Read request and Delete request. If the load on the queue is high, we increase the number of pollers, up to 1250.
You can read the following: https://aws.amazon.com/blogs/compute/estimating-cost-for-amazon-sqs-message-processing-using-aws-lambda/
Although, the blog post provides a nice summary for Lambda, it doesn't cover SQS cost as described in the post itself: "The costs for the polling and dequeue operations using SQS APIs are not included as part of the estimations. The internal SQS dequeue portion is outside the control of the Lambda developer and the cost estimates only cover the message processing using Lambda."
The SQS cost part is the one I'm interested in.
Relevant content
- asked a year ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
Can you confirm that AWS deletes messages one by one even in case of batching?
I do not have a definite answer, but I am pretty sure that we use Delete Batch (when you use a batch of messages of course).
The reason I slightly doubt that is that the Lambda doesn't require permission to the DeleteMessageBatch operation. Wouldn't that be necessary?
If you check the list of IAM actions for SQS, you will see that there is no Batch action. Not for Delete and not for Receive.
Ah you're right, I was just looking at SDK methods, not the actual actions. In that case it's a fair assumption that messages are deleted in batches. Thank you for all your help!