Estimating AWS Lambda Costs: A Comprehensive Guide
To estimate the cost of using AWS Lambda with 10,000,000 requests per month, you need to consider the following factors: the number of requests, the duration of execution, and the amount of memory allocated to the Lambda function. As you’ve only provided the number of requests, I’ll make some assumptions for the other factors.
Assumptions:
- Memory allocated to the Lambda function: 128 MB
- Average execution duration per request: 200 ms
AWS Lambda pricing is based on the number of requests and the duration of execution (measured in GB-seconds). The cost is calculated as follows:
- Number of requests: The first 1 million requests per month are free, and after that, it’s $0.20 per 1 million requests. With 10,000,000 requests, you would have 9 million billable requests.
Cost for requests: 9 * $0.20 = $1.80
- Duration of execution: The Lambda function’s execution duration is measured in GB-seconds. The first 400,000 GB-seconds per month are free. To calculate the cost, you’ll first need to determine the total GB-seconds.
Total GB-seconds = (Number of requests * Execution time (seconds) * Memory (GB))
Total GB-seconds = (10,000,000 * (200 / 1000) * (128 / 1024)) Total GB-seconds = 250,000 GB-seconds
Since 400,000 GB-seconds are free, you won’t be charged for the duration of execution in this case.
Total cost = Cost for requests + Cost for duration Total cost = $1.80 + $0 = $1.80
With these assumptions, your estimated AWS Lambda cost for 10,000,000 requests per month would be $1.80.
Please note that these costs are approximate and subject to change. For the most accurate and up-to-date information on AWS Lambda pricing, please refer to the AWS Lambda pricing page: https://aws.amazon.com/lambda/pricing/
The post How much AWS lambda cost with 1M request per month appeared first on Abhay Singh.