Skip to main content
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.

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

Usually not for interpreted languages. Compiled code and native libraries need an arm64 build.