AWS allows a Lambda function to be triggered by an SQS queue. With respect to the documentation, Lambda polls the queue and invokes the function synchronously with a batch of messages.
AWS takes the execution time into account while charging for a Lambda function. Does the polling time counted as the execution time and be charged? Or is it free?
It is not counted as the lambda execution time but it is not free either.
When there is no data to be pulled from your SQS queue, your lambda function is not executed, therefore there is no cost associated with lambda execution time.
But when lambda service polls SQS queue, it is a normal SQS API request and it is charged based on the SQS pricing. No matter how the SQS API request is made, whether manually via CLI, programatically via SDK or automatically via lambda service, it will be charged.
For example, you pay $0.0000004 per SQS API request (Standard queue) in US East region (or $0.40 per one million requests) and $0.0000005 per request (FIFO queue).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With