> ## 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.

# Migrate Fargate Tasks to Graviton

> Run ECS Fargate tasks on ARM64 (Graviton), which is priced lower per vCPU and GB than x86.

Fargate bills each task for the vCPU and memory it asks for, and both are priced lower on ARM64 (Graviton) than on x86. nOps finds ECS clusters running x86 Linux Fargate tasks on demand and estimates the saving from running them on ARM64.

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

## Why it matters

Services that already build their images for several architectures can move to Graviton by changing one setting in the task definition.

## How nOps finds it

nOps reads the last 7 days of on-demand x86 Linux Fargate billing (vCPU-hours and GB-hours) per ECS cluster. The saving is that cost times the difference between the ARM64 and x86 list prices in the region, for vCPU and memory separately. Hours covered by Savings Plans are left out, and so are savings under \$5 a month.

## Before you start

Container images built for ARM64 or multi-architecture, including sidecars and agents.

## How to implement

1. Build each container image for `linux/arm64`, or as a multi-architecture image, and push it.
2. Register a new task definition revision with `runtimePlatform` set to `cpuArchitecture: ARM64` and `operatingSystemFamily: LINUX`.
3. Update the service to the new revision; ECS replaces tasks with a rolling deployment.
4. Check logs, errors and latency after the rollout.
5. Make the change in Terraform, CloudFormation or your deployment pipeline.

## Risks and considerations

* Images built only for x86 fail to start on ARM64.
* Fargate Spot is not available for ARM64 tasks, so services already on Fargate Spot may save more where they are.
* To roll back, update the service to the previous x86 task definition revision.

## FAQs

> [accordion] Why is the recommendation per cluster and not per service?
>
> Fargate billing identifies the cluster each task ran in. Check which services in the cluster run x86 tasks and move each one.

## Related

* [Run Non-Production ECS Tasks on Fargate Spot](https://help.nops.io/inform/supported-recommendations/run-non-production-ecs-tasks-on-fargate-spot)
* [Rightsize ECS Service](https://help.nops.io/inform/supported-recommendations/rightsize-ecs-service)
* [Switch Lambda Function to Arm64](https://help.nops.io/inform/supported-recommendations/switch-lambda-function-to-arm64)
* [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.