AWS Lambda Memory Vs CPU configuration

Viewed 8630

In AWS lambda environment we can specify only the memory configuration. Is there any documentation as to what the CPU config will be for a given memory configuration?

For example,

  ApiLambda:
    Type: AWS::Serverless::Function
    Properties:
      Description: "This function handles the example"
      CodeUri: "./app/"
      Handler: "app.handle_request"
      MemorySize: 128
      Timeout: 60
      Runtime: python3.7

I am trying to find the minimum MemorySize for a particular number of cores. Is there any way to know the boundaries of MemorySize where the #Cores changes without bruteforcing MemorySize?

Ref:

https://aws.amazon.com/about-aws/whats-new/2020/12/aws-lambda-supports-10gb-memory-6-vcpu-cores-lambda-functions/ https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html

1 Answers

The official thresholds are:

  • 1 vCPU for 1,769 MB (ref)
  • 6 vCPUs for 10,240 MB (ref)

Recent study concludes the following for what is happening in-between:

enter image description here

Related