I'm trying to launch an Amazon Elastic Compute Cloud (Amazon EC2) instance from an Amazon Machine Image (AMI). Why is the instance type I want to launch disabled?
The instance types A1, T4g, M6g, C6g, and R6g use AWS Graviton processors. AWS Graviton processors use the aarch64 (ARM64) architecture instead of x86_64 (AMD64).
ARM64 architecture uses a different set of CPU instructions than the instructions used by the x86_64 architecture family. These instruction sets provide a mechanism for sending commands to the processor. During software compilation, the human-readable software code converts to CPU instructions specific to a CPU architecture. Any CPU of that architecture type can use these CPU instructions. However, the CPU of one architecture type can't understand the instruction set of another type. So, an AMI compiled from one architecture runs only on the CPUs of that architecture type.
ARM64 and x86_64 architectures use different instruction sets. This means that EC2 instances and AMIs created using the x86_64 architecture aren't compatible with instances use the ARM64 architecture. This incompatibility causes one of the following to happen when launching or changing instances types:
- When launching a Graviton instance type with your selected EC2 AMI, the launch wizard might display the new instance types as disabled.
- If you change the instance type of an already deployed EC2 instance that isn't currently using the new architecture type, you might receive an error. The error message is similar to the following:
"'m6g.large' is not a valid instance type for instance 'i-xyz' of architecture 'x86_64'".
To use a different architecture, first create a new EC2 instance or AMI.
Note: An AMI might be incompatible with your instance type without enhanced networking enabled. For more information, see How do I enable and configure enhanced networking on my EC2 instances?
Launching new instances
All major Linux distributions are available on ARM architecture. To launch an instance using ARM architecture:
- Open the Amazon EC2 console.
- Choose Launch instance, Launch instance.
- Choose 64-bit (ARM) next to the AMI corresponding to the ARM version of your favorite distribution, and then choose Select.
- Complete launching the instance.
After you start the instance, it behaves like any EC2 instance.
Changing instance types
Because of the different instruction sets, a direct instance type change isn't possible between architecture types. To migrate your system to the new architecture, do the following:
- Launch a new EC2 instance of your desired configuration.
- Migrate your application to the new EC2 instance.
AWS Graviton processor