Configuring Lambda function memory - AWS Lambda

Configuring Lambda function memory

Lambda allocates CPU power in proportion to the amount of memory configured. Memory is the amount of memory available to your Lambda function at runtime. You can increase or decrease the memory and CPU power allocated to your function using the Memory (MB) setting. To configure the memory for your function, set a value between 128 MB and 10,240 MB in 1-MB increments. At 1,769 MB, a function has the equivalent of one vCPU (one vCPU-second of credits per second).

This page describes how to update the memory allotted to your function in the Lambda console.

Configuring function memory in the Lambda console

You can configure the memory of your function in the Lambda console.

To update the memory of a function

  1. Open the Functions page on the Lambda console.

  2. Choose a function.

  3. On the function configuration page, on the Basic settings pane, choose Edit.

  4. For Memory (MB), set a value from 128 MB to 10,240 MB.

  5. Choose Save.

Accepting function memory recommendations on the Lambda console

If you have administrator permissions in AWS Identity and Access Management (IAM), you can opt in to receive Lambda function memory setting recommendations from AWS Compute Optimizer. For instructions on opting in to memory recommendations for your account or organization, see Opting in your account in the AWS Compute Optimizer User Guide.

When you've opted in and your Lambda function meets Compute Optimizer requirements, you can view and accept function memory recommendations from Compute Optimizer in the Lambda console.

To accept a function memory recommendation

  1. Open the Functions page on the Lambda console.

  2. Choose a function.

  3. On the function configuration page, on the Basic settings pane, choose Edit.

  4. Under Memory (MB), in the memory alert, choose Update.

  5. Choose Save.