Hands-On Serverless Applications with Kotlin
上QQ阅读APP看书,第一时间看更新

Service limits

FaaS, or, for that matter, any cloud offering, works on a shared and multi-tenant architecture. That means that the available inventory is earmarked to serve all of the customers of the provider. Naturally, this implies that the usage of services is capped at a sensible limit.

Lambda is no different. AWS puts a limit on the usage parameters of the service. Some of these limits can be increased by submitting a request to the AWS support center. The service team reviews and grants the approval if it makes business sense to them.

The following list enumerates the limits that are applied to each Lambda function at the time of writing this book. The official page has the latest numbers:

  • Memory allocation range: 128 MB to 3,008 MB
  • Ephemeral disk capacity (/tmp space): 512 MB
  • Number of file descriptors: 1,024
  • Total number of processes and threads: 1,024
  • Maximum execution duration per request: 300 seconds
  • Synchronous invocation request and response size: 6 MB 
  • Synchronous invocation request and response size: 128 KB
  • Deployment package size (compressed): 50 MB
  • Cumulative size of all deployment packages: 75 GB
  • Code size (uncompressed): 250 MB
  • Size of environment variables: 4 KB
  • Number of concurrent executions per region: 1,000

The above are subject to change and the reader can stay updated with the AWS Lambda Service Limits official documentation page.