# Suboptimal Architecture Selection in AWS Lambda

Canonical: https://www.pointfive.co/efficiency-hub/inefficiencies/suboptimal-architecture-selection-in-aws-lambda

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

# Suboptimal Architecture Selection in AWS Lambda

## Explanation

Lambda functions default to the x86\\\_64 architecture, which is more expensive than Arm64. For many workloads, especially those written in interpreted languages (e.g., Python, Node.js) or compiled to architecture-neutral bytecode (e.g., Java), there is no dependency on x86-specific binaries. In such cases, moving to Arm64 can reduce compute costs by 20% without impacting functionality. Despite this, many teams continue to run Lambda functions on x86\\\_64 due to legacy configurations, inertia, or lack of awareness. This leads to avoidable spending, particularly at scale or in high-volume environments.

## Relevant Billing Model

Lambda is billed based on: \* Number of requests \* Duration of execution (in milliseconds) \* Memory allocated \* CPU architecture (Arm64 functions cost  up to 20% less  than x86\\\_64)

## Detection

- Architecture is set to  x86\\\_64

- Function code does not rely on architecture-specific binaries or compiled dependencies

- Runtime is compatible with Arm64 (e.g., Python, Node.js, Java)

- High aggregate usage of "GB-seconds" across x86 functions contributes significantly to Lambda costs

- No benchmarking or cost comparison has been performed between x86 and Arm

## Remediation

- Benchmark representative functions on both architectures to validate performance and compatibility

- For functions using architecture-neutral runtimes or dependencies, migrate to  Arm64  via configuration update

- Ensure CI/CD pipelines and IaC templates default to  Arm64  for new functions

- Educate development teams on architecture implications and expected savings

- Use tagging or cost attribution to track savings post-migration

## Relevant Documentation

[https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html](https://docs.aws.amazon.com/lambda/latest/dg/foundation-arch.html) 
[https://aws.amazon.com/blogs/compute/using-arm64-for-aws-lambda-functions/](https://aws.amazon.com/blogs/compute/using-arm64-for-aws-lambda-functions/) 
[https://aws.amazon.com/lambda/pricing/](https://aws.amazon.com/lambda/pricing/)

[Submit Feedback](https://hub.pointfive.co/inefficiencies/suboptimal-architecture-selection-in-aws-lambda)

## At a glance

Reference

CER-0218

Cloud provider

AWS

Service

AWS Lambda

Category

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

Inefficiency type

Suboptimal Configuration

## Contributed by

- Andrew Shieh 

### Andrew Shieh

Principal Engineer / Director of Engineering, Operations @ SmugMug

[LinkedIn](https://www.linkedin.com/in/shandrew/)

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

