How much does a lambda cost

When I published Lambda that is called regularly like a cron task someone asked me how much would it cost (a fair question taking into account you pay per use, not per infrastructure). With lambda you pay for two things: a request/invocation and the time times memory used.

For that particular case (1 request per minute) the monthly cost would be:

Unit cost Cost
60 requests/hour * 24 hours/day * 31 days/month
44640 requests $0.0000002 $0.0089280
0.1 seconds minimum charge per execution * 44640 requests * 0.128GB of memory
558 GB-s $0.00001667 $0.00930186
Total $0.01822986
Note: This assumes that the free tier (1M requests and 400,000 GB-seconds) has been exhausted. So, on the worst case it's an expense of $0.02/month.

Want more python/AWS time-savers? Just subscribe!

links

social