Articles → AWS → AWS Lambda PricingAWS Lambda PricingIn this article, we will calculate the AWS lambda pricing.Requirement A function has 128 MB of memory that executes 2 million times a month running at 200ms each time. Another function has 512 MB of memory that executes 3 million times a month running at 300ms each time.Charges There are 2 types of charges: -Function execution ChargeMemory chargeLambda Pricing Charges Amazon lambda function provides free 1 million requests per month and 400,000 GB-seconds of compute time per month. As per the lambda pricing page, these are charges.Click to EnlargeExecution Charges Number of execution requests per month from function 1 = 2 millionNumber of execution requests per month from function 2 = 3 millionTotal number of free requests per month = 1 millionTotal number of paid requests = (3 million + 2 million) -1 million = 4 millionRequest charges = 4 million X $0.2 = $0.8Function 1 takes 200ms (0.2 seconds) to execute 1 million requests. So, the total number of execution seconds is 2 million X 0.2 = 0.4 seconds.Similarly, function 2 takes 300ms (0.3 seconds) to execute 1 million requests. So, the total number of execution seconds is 3 million X 0.3 = 0.9 seconds.Calculation Of Memory Allocation Charges Total GB-second for function 1 = (128/1024) GB X0.4 million seconds = 50,000 GB-seconds.Total GB-second for function 2 = (512/1024) GB X0.9 million seconds = 450,000 GB-seconds.Compute Usage = 50000 + 450000 – 400000 = 100000 GB seconds.Compute Charges = 100000 X $0.00001667 = $1.67Total charges = $0.8 + $1.67 = $2.47Posted By - Karan Gupta Posted On - Friday, June 30, 2023 Query/Feedback Your Email Id Subject Query/Feedback Characters remaining 250
Query/Feedback