How AWS lambda would get billed – A real pricing example

0
2197
A real AWS Lambda screen snapshot
A real AWS Lambda screen snapshot

In one of my project work there are around 20 Lambda functions and those are using 128 MB to 512 MB of memory. Amazon biils 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 items are here that would be count as a unit to get billed by AWS Lambda :

  • Request received by Lambda Funciton
  • 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,

 AWS Lambda
AWS Lambda

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

 

More details about the AWS Lambda Pricing refer :

https://aws.amazon.com/lambda/pricing/

 

Further resources :

Forums for AWS Lambda :

https://forums.aws.amazon.com/forum.jspa?forumID=186

StackOverflow about AWS Lambda :

http://stackoverflow.com/search?q=AWS+Lambda

What is AWS Lambda :

http://docs.aws.amazon.com/lambda/latest/dg/welcome.html

Getting started with AWS Lambda :

SHARE
Previous articleHash Table Data Structure
Next articleHow to calculate AWS S3’s (Simple Storage Service) Pricing?
Since last 15 years in different geographical locations, Sumit prepared hiring format for several hiring managers/teams to hire the balanced talents and interviewed talents on the various stages of their selection process. He also interviewed by hundreds of companies in different geographical locations.His best conclusion for hiring teams and candidate is to prepare in advance. Here ‘advance’ means keep your interview book ready and continue to update it even you are not going to interview candidates or applying for any job in next six months.