Status: Done

Some notes on Lambda Pricing

Lambda Extensions

Caution! The lambda function can start executing and reading the payload of other lambda invocations by calling 2018-06-01/runtime/invocation/nexteven with an explicit deny. The “runtime” environment needs to be able to process the next request (aka warm start)

People will abuse this. They will send you malicious code to execute (e.g. crypto mining, bot networks, etc.) and you will be responsible for those actions from AWS’s perspective. If functions you own start doing bad things AWS will shut your account down.

Lambda execution time is limited to 15 minutes.

they do not have persistent local storage

The maximum size for a .zip deployment package for Lambda is 250 MB (unzipped). Note that this limit applies to the combined size of all the files you upload, including any Lambda layers.

  • Compute Charges: $326.73
  • Request Charges: $0.00 (within the free tier of 1 million requests)
  • Ephemeral Storage Charges: $1.55

Total Estimated Cost: $328.28

This calculation assumes:

  • The function is invoked 1 million times a month.
  • Each invocation has an average execution duration of 5 seconds.
  • The function is allocated 4GB of memory.
  • The function uses 10GB of ephemeral storage.

For 1000 instances of your AWS Lambda function, each handling an average of 3 million requests per month, here’s the updated estimated cost:

  • Compute Charges: $1,001,193.33
  • Request Charges: $599.80
  • Ephemeral Storage Charges: $4,635.00

Total Estimated Cost for All Instances: $1,005,428.13

This calculation reflects the aggregate costs for all instances, considering:

  • Each function instance is invoked 3 million times a month.
  • Each invocation has an average execution duration of 5 seconds.
  • Each function is allocated 4GB of memory.
  • Each function uses 10GB of ephemeral storage.

The total charges include the cumulative cost of compute, requests beyond the free tier, and ephemeral storage for all 1000 function instances