> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Switch Lambda Function to Arm64

> Switch Lambda functions from x86_64 to the lower-cost arm64 architecture.

Lambda functions on arm64 (AWS Graviton) are billed at a lower price per GB-second than the same function on x86\_64. nOps finds functions running on x86\_64 and estimates the saving from switching their architecture to arm64.

| | |
| - | - |
| **Cloud** | AWS |
| **Category** | Compute |
| **Service** | AWS Lambda |
| **Action** | Modify |
| **Effort** | Medium |
| **Restart needed** | Yes |
| **Can be rolled back** | Yes |
| **Analysis window** | Last 7 days |
| **Source** | nOps |

## Why it matters

Most functions written in Python, Node.js, Java, Go or .NET run on arm64 with no code changes, so the switch is often just a configuration and build change.

## How nOps finds it

nOps reads the last 7 days of on-demand Lambda billing for x86\_64 compute (GB-seconds) per function. The saving is that cost times the difference between the arm64 and x86\_64 list prices in the region (first pricing tier). Usage covered by Savings Plans is left out, and so are savings under \$5 a month.

## Before you start

Arm64 builds of any native dependencies, layers or container images the function uses.

## How to implement

1. Check the function's dependencies and layers for x86-only native code (compiled libraries, binaries).
2. Rebuild the deployment package or container image for arm64.
3. Deploy it with the arm64 architecture (Lambda console: **Code → Runtime settings → Edit → Architecture**, or `aws lambda update-function-code --function-name NAME --architectures arm64 --zip-file fileb://package.zip`).
4. Test the function and compare duration, since run time can change slightly.
5. Set the architecture in your SAM, Serverless Framework, Terraform or CloudFormation template.

## Risks and considerations

* Functions with x86-only native dependencies or layers fail on arm64 until those are rebuilt.
* Duration can change on arm64, which changes the real saving in either direction.
* To roll back, deploy the x86\_64 package with the x86\_64 architecture again, or shift an alias back to the previous version.

## FAQs

> [accordion] Do I need to change my code?
>
> Usually not for interpreted languages. Compiled code and native libraries need an arm64 build.

## Related

* [Migrate Fargate Tasks to Graviton](https://help.nops.io/inform/supported-recommendations/migrate-fargate-tasks-to-graviton)
* [Rightsize Lambda Function](https://help.nops.io/inform/supported-recommendations/rightsize-lambda-function)
* [Reduce Lambda Provisioned Concurrency](https://help.nops.io/inform/supported-recommendations/reduce-lambda-provisioned-concurrency)
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.