Skip to main content
AWS Graviton Migration: What Broke and What We Saved

AWS Graviton Migration: What Broke and What We Saved

KU
· Founder & Chief Editor
• 7 min read•Updated •49 views

Moving our fleet from x86 to Graviton promised 20% savings. We got 31%, but only after fixing native dependencies, a broken base image, and one nasty perf regression.

Key takeaways

  • Migrating to AWS Graviton is worth it for most fleets: AWS lists Graviton instances at up to 20 percent less than comparable x86, and interpreted or Go services usually move with an instance-type change.
  • The work concentrates in native dependencies, so build multi-arch images, add an ARM64 CI runner first, and profile each service after the move.

Migrating to AWS Graviton saved us money and is worth doing for most fleets. Go and pure-interpreted services moved with an instance-type change; native dependencies (gRPC, sharp, numpy pins, database drivers) were where it broke. Build multi-arch images with docker buildx, put an ARM64 runner in CI before migrating anything, and profile every service after the switch.

Verified against

AWS Graviton and M8g (Graviton4) product pages, Docker Engine 29 multi-platform build docs, the GitHub-hosted runners reference, and the Node.js release schedule. Checked October 2026.

The finance review flagged our EC2 spend at $48,000 a month and someone asked the obvious question: why are we still on x86 when Graviton is cheaper for the same work? AWS's own pitch, as of October 2026, is that Graviton-based instances cost up to 20% less than comparable x86 instances. We ran the migration over six weeks. The savings were real, better than the list-price gap in our case, but the path there had three sharp edges that would have bitten anyone.

The easy 60% of services just worked

Anything pure-interpreted moved with a one-line change. Our Go services recompiled for ARM64 without a code change. Node and Python services that only used pure-JS or pure-Python packages ran as soon as the base image was ARM. For those, the migration was literally changing the instance type in Terraform.

infra/modules/service/ec2.tf
# before
instance_type = "m6i.xlarge"
# after
instance_type = "m7g.xlarge"   # Graviton3

The m7g.xlarge has the same 4 vCPU / 16 GiB shape as the m6i.xlarge at a lower on-demand rate, and on our Go services it handled slightly more requests per second. Check the current per-Region price before you plan around a percentage, because the gap varies by family and Region. If you're starting today, also price the m8g family: AWS says Graviton4 delivers up to 30% better performance than the Graviton3-based M7g. If your whole stack is like this, stop reading and go do it.

Native dependencies were the wall

The other 40% hit a wall the moment a package tried to load a compiled binary built for x86. The errors are ugly and not always obvious. A Python service died on import with:

code
ImportError: .../grpc/_cython/cygrpc.so: cannot open shared object file

The root cause was a wheel compiled for x86_64 baked into our image. The fix is to build on the target architecture. We moved to multi-arch Docker builds with buildx so the image actually contains ARM64 binaries.

Bash
docker buildx build \
    --platform linux/amd64,linux/arm64 \
    -t registry/order-service:1.8.0 \
    --push .

Docker's docs list three ways to get the arm64 half: QEMU emulation (no Dockerfile changes, but slow for compilation), native arm64 builder nodes, or cross-compiling in a stage pinned to $BUILDPLATFORM. Emulated builds of anything with a C extension were painfully slow for us, so native nodes won. Docker Engine 29 and later use the containerd image store by default, which is what lets a local build hold a multi-platform manifest list; on older engines, push with --push instead. Our multi-arch builds with buildx guide covers the builder setup in detail.

The trap underneath this: our Dockerfile pinned FROM node:20-bullseye but a transitive sharp (image processing) dependency shipped prebuilt x86 binaries and silently fell back to them. We had to force a source rebuild:

services/media/Dockerfile
RUN npm rebuild --build-from-source sharp

Audit every dependency that has "native," "binding," "compiled," or crypto/image/ML work in its description. Those are where ARM breaks. We found seven across the fleet: sharp, grpcio, some pandas/numpy pins, a Postgres driver, and a Sentry native extension.

The performance regression nobody warned us about

One service got slower on Graviton, our JSON-heavy API gateway saw p99 climb about 12%. That made no sense until we profiled it. The Node build was using a generic ARM build of an underlying library instead of one tuned for Graviton's specific chip. Newer runtime versions ship better ARM-optimized code paths, so the fix at the time was a Node 20 minor upgrade plus a newer JSON library. p99 came back and then went slightly below x86. Node 20 itself reached end-of-life on March 24, 2026, so anyone migrating now should start from a current LTS line (v22, v24 or v26 as of October 2026) and skip that detour.

The lesson: don't assume ARM equals slower or faster. Profile the actual service. Most got faster, one got slower for a fixable reason, and only measurement told them apart.

CI had to learn ARM too

Our runners were x86, so images built and tested there passed CI and then failed on ARM in production. We added an ARM runner and a smoke test that runs the actual container on ARM64 before promotion.

YAML
# .github/workflows/build.yml (job excerpt)
build-arm:
  runs-on: ubuntu-24.04-arm
  steps:
    - run: docker buildx build --platform linux/arm64 -t test:arm .
    - run: docker run --rm test:arm /app/healthcheck --strict

GitHub lists ubuntu-24.04-arm and ubuntu-22.04-arm as hosted runner labels for both public and private repositories (4 vCPU / 16 GB for public, 2 vCPU / 8 GB standard for private, as of October 2026), so this no longer requires self-hosting. Skipping this is how you turn a migration into a series of production incidents. The --strict healthcheck that actually imports every native module caught two problems before users did.

What we actually saved

Compute dropped from $48,000 to about $33,000 a month, roughly a 31% cut. That beat the list-price gap because the move also forced us to right-size a few over-provisioned services that now had headroom; the right-sizing, not the chip, did a large share of it. That's our bill, not a benchmark, and yours will depend on how over-provisioned you were. For the other levers that compound with this one, see our AWS cost optimization strategies. Add the RDS instances we moved to Graviton and the total was closer to $16,000/month saved. The migration cost roughly three engineer-weeks spread across the six calendar weeks.

Questions people ask

Is AWS Graviton actually cheaper than x86?

On list price, yes: AWS states Graviton-based instances cost up to 20% less than comparable x86 EC2 instances, as of October 2026. The real saving depends on performance per instance for your workload, so measure requests per second or job time on both before resizing. Fleets that were over-provisioned often save more than the list gap, because the migration is a natural moment to right-size.

What breaks when you migrate to ARM64?

Mostly native code. Pure Go, Java, Node and Python services usually run unchanged on an arm64 base image. Failures come from packages that ship compiled binaries: image libraries like sharp, gRPC, scientific Python wheels, database drivers and APM agents. The symptom is usually an ImportError or "cannot open shared object file" at startup, which is why an ARM smoke test in CI matters.

Can GitHub Actions build and test ARM images natively?

Yes. GitHub-hosted runners include ubuntu-24.04-arm and ubuntu-22.04-arm labels for public and private repositories, so you can build with docker buildx and run the container on real arm64 hardware without QEMU. Running the image there, not just building it, is what catches native modules that compile fine but fail to load.

The call we'd make

Do it, but stage it. Move the pure-interpreted services first for a fast, safe win that funds the rest. Budget real time for the native-dependency tail, that's where the effort concentrates and where a rushed migration causes outages. And put an ARM runner in CI on day one, before you migrate anything, so the whole project has a safety net. The savings are large enough that the payback is measured in weeks, not quarters.

Sources

Explore topics:AWSCloud
React
Share this post
Cite this article
Plain text

Kiril Urbonas (2026). AWS Graviton Migration: What Broke and What We Saved. DevOpsNess. Updated 2026-10-31. https://www.devopsness.com/blog/aws-graviton-migration-what-broke-what-we-saved

Markdown

[AWS Graviton Migration: What Broke and What We Saved](https://www.devopsness.com/blog/aws-graviton-migration-what-broke-what-we-saved) (Kiril Urbonas, DevOpsNess, updated 2026-10-31)

KU

Kiril Urbonas

Founder & Chief Editor

604 articles
View all articles by Kiril Urbonas

You might have missed

Evergreen posts worth revisiting.