# Overprovisioned memory allocation for Lambda functions

Canonical: https://www.pointfive.co/efficiency-hub/inefficiencies/overprovisioned-memory-allocation-for-lambda-functions

Each Lambda function must be configured with a memory setting, which indirectly controls the amount of CPU and networking performance allocated.

By: Shireen Maini

[Cloud Efficiency Hub](https://www.pointfive.co/efficiency-hub) 

# Overprovisioned Memory Allocation for Lambda Functions

The short version

Each Lambda function must be configured with a memory setting, which indirectly controls the amount of CPU and networking performance allocated.

[Shireen Maini](https://www.linkedin.com/in/shireen-maini/)

DevOps Team Lead @ BroadPeak Partners

AWS service

[AWS Lambda](https://www.pointfive.co/efficiency-hub/cloud-services/aws-lambda)

Category

[Compute](https://www.pointfive.co/efficiency-hub/service-category/compute)

Reference

CER-0103

Type

Overprovisioned Resource

## Explanation

Why the waste happens and who it affects.

In many environments, memory settings are defined arbitrarily or left unchanged as functions evolve. Over time, this leads to overprovisioning - with functions running well below their allocated memory and incurring unnecessary compute costs. Systematic right-sizing using performance benchmarks can significantly reduce spend without sacrificing performance or reliability. This is especially important for frequently invoked functions or those with long execution times.

## Billing model

The pricing dimensions that drive this cost.

Lambda is billed based on:

- Number of invocations

- Duration (ms) x memory size (MB)

- Larger memory settings increase vCPU and I/O, but also cost more per millisecond

Overprovisioning memory leads to unnecessary cost without meaningful performance improvement, especially if functions complete within modest CPU and memory bounds.

## How to detect

4 checks to find it in your estate.

- Analyze memory usage metrics for Lambda functions to identify consistently low utilization

- Use performance profiling (e.g., Lambda Power Tuning) to model cost vs. performance tradeoffs

- Check for functions using default or inherited memory values without workload-specific tuning

- Look for functions with high invocation volume and long durations to prioritize optimization impact

## How to fix

4 ways to remove the waste.

- Use tools like AWS Lambda Power Tuning to benchmark and optimize memory and vCPU settings

- Incorporate right-sizing into CI/CD workflows to evaluate configuration during deployment

- Apply consistent tagging or governance to track functions requiring periodic review

- Consider automated tuning pipelines for environments with frequent code changes or dynamic usage patterns

## Documentation

Vendor references for pricing and configuration.

- [AWS Lambda Power Tuning  github.com](https://github.com/alexcasalboni/aws-lambda-power-tuning)

- [Lambda Resource Configuration  docs.aws.amazon.com](https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html)

## Related inefficiencies

[Browse the library](https://www.pointfive.co/efficiency-hub)

- AWS Lambda  CER-0296

### [Inefficient Lambda Pricing Model for Steady High-Volume Workloads (Use Lambda Managed Instances)](https://www.pointfive.co/efficiency-hub/inefficiencies/inefficient-lambda-pricing-for-steady-high-volume-workloads-use-lambda-managed-instances)

A function has steady, high-volume traffic (or predictable load) but continues running on default Lambda pricing, where costs scale with execution duration. Lambda Managed Instances runs Lambda on EC2 capacity managed by Lambda and...

Compute

- AWS Lambda  CER-0290

### [Unnecessary Lambda Provisioned Concurrency on Low-Utilization Functions](https://www.pointfive.co/efficiency-hub/inefficiencies/unnecessary-lambda-provisioned-concurrency-on-low-utilization-functions)

Provisioned Concurrency is enabled for Lambda functions that do not require consistently low latency or steady traffic. In such cases, provisioned concurrency remains allocated and billed during idle periods, creating ongoing cost without...

Compute

- AWS Lambda  CER-0209

### [Unnecessary Costs from Unused Lambda Versions with SnapStart](https://www.pointfive.co/efficiency-hub/inefficiencies/unnecessary-costs-from-unused-lambda-versions-with-snapstart)

Many teams publish new Lambda versions frequently (e.g., through CI/CD pipelines) but do not clean up old ones. When SnapStart is enabled on Python or .NET functions, each of these versions retains a cached snapshot, generating ongoing...

Compute

---
Source: the public page above. Product screenshots and illustrative interfaces are examples, not live customer data.

