DEV Community

AWS Community Builders

10 quick facts about AWS Lambda

Tomasz Łakomy
Senior Frontend Engineer at OLX Group. Tech speaker, instructor, lifelong learner.
Originally published at ・2 min read
  1. By default there's a limit of 1000 concurrent lambda executions, this can be raised with a support ticket. There are companies that have this limit raised up to tens of thousands concurrent lambda executions.
  2. There's a default limit of 75GB of code storage (so up to 10 React apps, lol) which can also be raised
  3. It's possible to run Lambda functions on a custom VPC, which is useful when you need to work with RDS, EC2, containers etc. When using a custom VPC you should create a custom subnet for lambda functions to prevent issues when the function will scale massively
  4. You get charged for the lambda execution time in 100ms blocks (so if your function takes 10ms to execute, you'll pay for 100ms)
  5. With aliases you can run different versions of Lambda function with a different probability (for instance run version A 90% of the time and version B 10% of the time)
  6. You can push failed async lambda function invocations to dead letter queue (for instance - SQS)
  7. Pricing:

First 1 million requests per month are free, afterwards you pay $0.20 per additional 1 million requests

  • 400,000 GB seconds free per month, afterwards you pay $0.0000166667 for every GB second
  • Example: 128MB of Memory x 30M executed per month x 200ms run time per invocation = $5.83
  • Cold starts affect less than 1% of production workloads (they are much more common in development environments, since there is way less traffic). A duration of a cold start varies from less than 100ms to more than 1s. It's not possible to 'target' warm environments.
  • In order to reuse existing connections (and improve the performance of functions using http(s) request) use keep-alive property in order to reuse TCP connections on warm execution environments. More details:
  • It's possible to use custom runtimes for Lambda (apart from Node, .NET, Python etc.) so if you really want to use Haskell you can do that

If you'd like to learn more I'd recommend:

Discussion (2)

llldar profile image

Also It had a time limit of 15 minutes, don't ask me how I discovered it.

herrbertling profile image
Markus Siering

I can describe a simple way: Spin up a loop to go over all S&P500 stocks, kick off a Step Functions process for each stock for each day within a year AND generate a uuid for every single process you kick off 😅

Then you discover a) how much data you really want/need and b) what a wonderful service SQS is 😄