Working with 64-bit ARM workloads on Amazon ECS - Amazon Elastic Container Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Working with 64-bit ARM workloads on Amazon ECS

Amazon ECS supports using 64-bit ARM applications. You can run your applications on the platform that's powered by Amazon Graviton2 processors. It's suitable for a wide variety of workloads. This includes workloads such as application servers, micro-services, high-performance computing, CPU-based machine learning inference, video encoding, electronic design automation, gaming, open-source databases, and in-memory caches.

Considerations

Before you begin deploying task definitions that use the 64-bit ARM architecture, consider the following:

  • The applications can use the Fargate or EC2 launch types.

  • Linux tasks with the ARM64 architecture don't support the Fargate Spot capacity provider.

  • The applications can only use the Linux operating system.

  • For the Fargate type, the applications must use Fargate platform version 1.4.0 or later .

  • The applications can use Fluent Bit or CloudWatch for monitoring.

  • For the Fargate launch type, the following Amazon Web Services Regions do not support 64-bit ARM workloads:

    • US East (N. Virginia), the use1-az3 Availability Zone

  • For the Amazon EC2 launch type, see the following to verify that the Region that you're in supports the instance type you want to use:

    You can also use the Amazon EC2 describe-instance-type-offerings command with a filter to view the instance offering for your Region.

    aws ec2 describe-instance-type-offerings --filters Name=instance-type,Values=instance-type --region region

    The following example checks for the M6 instance type availability in the US East (N. Virginia) (us-east-1) Region.

    aws ec2 describe-instance-type-offerings --filters "Name=instance-type,Values=m6*" --region us-east-1

    For more information, see describe-instance-type-offerings in the Amazon EC2 Command Line Reference.

Specifying the ARM architecture in your task definition

To use the ARM architecture, specify ARM64 for the cpuArchitecture task definition parameter.

In the following example, the ARM architecture is specified in a task definition. It's in JSON format.

{ "runtimePlatform": { "operatingSystemFamily": "LINUX", "cpuArchitecture": "ARM64" }, ... }

In the following example, a task definition for the ARM architecture displays "hello world."

{ "family": "arm64-testapp", "networkMode": "awsvpc", "containerDefinitions": [ { "name": "arm-container", "image": "arm64v8/busybox", "cpu": 100, "memory": 100, "essential": true, "command": [ "echo hello world" ], "entryPoint": [ "sh", "-c" ] } ], "requiresCompatibilities": [ "FARGATE" ], "cpu": "256", "memory": "512", "runtimePlatform": { "operatingSystemFamily": "LINUX", "cpuArchitecture": "ARM64" }, "executionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole" }

Interfaces for configuring ARM

You can configure the ARM CPU architecture for Amazon ECS task definitions using one of the following interfaces:

  • Amazon ECS console

  • Amazon Command Line Interface (Amazon CLI)

  • Amazon SDKs

  • Amazon Copilot