In one of my project work there are around 20 Lambda functions and those are using 128 MB to 512 MB of memory. Amazon bills amount based on the number of Requests and Duration of the execution of each Lambda function.
Example :
Lets say you have a lambda function name : processMessageLambda function, this function get executed based on the reception of a specific HTTP Post request from API Gateway.
So two things are here
- Request received by Lambda Function
- Duration took by Lambda function to process that request
* If your AWS lambda function would be using the other services e.g. dynamoDB or S3 then those would be charged separately,
Here are some of the real examples of the Duration of the compute used by Lambda functions on execution:
- Duration: 256.67 ms Billed Duration: 300 ms Memory Size: 256 MB Max Memory Used: 63 MB
- Duration: 111.33 ms Billed Duration: 200 ms Memory Size: 256 MB Max Memory Used: 63 MB
- Duration: 13377.40 ms Billed Duration: 13400 ms Memory Size: 512 MB Max Memory Used: 67 MB
- Duration: 46.64 ms Billed Duration: 100 ms Memory Size: 640 MB Max Memory Used: 57 MB
- Duration: 921.23 ms Billed Duration: 1000 ms Memory Size: 320 MB Max Memory Used: 163 MB
- Duration: 860.30 ms Billed Duration: 900 ms Memory Size: 320 MB Max Memory Used: 163 MB
And below is a real example of the monthly bill statement:
US East (Northern Virginia) Region Usage
AWS Lambda Lambda-GB-Second
AWS Lambda – Compute Free Tier – 400,000 GB-Seconds – US East (Northern Virginia) 400,000 seconds $0.00
AWS Lambda – Total Compute – US East (Northern Virginia) 11,701,164.063 seconds $195.02
Total: $195.02
AWS Lambda Request
AWS Lambda – Requests Free Tier – 1,000,000 Requests – US East (Northern Virginia) 1,000,000 Requests $0.00
AWS Lambda – Total Requests – US East (Northern Virginia) 77,735,794 Requests $15.55
Total: $15.55
For more details about the AWS Lambda Pricing refer :