Skip to content

Enable CentOS‑7 AMI to support latest EC2 instance families (c6, c6a, c7, c7a etc.,)

0

We have EC2 instances launched using CentOS 7–based AMI (https://aws.amazon.com/marketplace/reviews/reviews-list/B00O7WM7QW). This AMI does not support the newer EC2 instance families (c6, c6a, c7, c7a). As a result:

New instances launched from our AlmaLinux 2 AMI can be changed to c6a/c7a families without issue.

Existing instances launched from our CentOS 7 AMI—even after we manually migrated their OS to AlmaLinux 2—cannot be changed to the newer families.

I would like to know if there is some metadata, kernel configuration, or AMI‐level setting that dictates which instance types are supported which upon changing will allow us to change Instances to newer families after migration of OS.

I’d like to avoid having to delete and re-create these machines just to move them into a new instance family.

asked a year ago511 views

3 Answers
1

The marketplace image you listed is offered directly by CentOS and not by AWS. CentOS have limit the instance types option.

Try reaching out to CentOS directly for support.

Alternatively, create new instance as suggested by re:Post agent

AWS
EXPERT

answered a year ago

0

Note, CentOS 7 reached its end of life (EOL) on June 30, 2024 according to RedHat - are you sure you want to use this.

https://www.redhat.com/en/topics/linux/centos-linux-eol

EXPERT

answered a year ago

  • No no we no longer use it, we have a new Alma2 based AMI and we have converted our existing EC2 instances built on Cent OS 7 AMI to Alma2 but we are unable change the Instance Type of the existing EC2 instances built on Cent OS 7 to latest family of Instances like c6a or c7a etc., even though OS is Alma2.

0

When working with AWS Marketplace AMIs like CentOS 7, there are specific limitations on which instance types can be used. This is not just a technical limitation but also a configuration set by the AMI provider.

The issue you're experiencing is that Marketplace AMIs are bound to certain instance types, and newer instance families (like c6, c6a, c7, c7a) may not be included in the supported list for older AMIs such as CentOS 7. This happens even if the architecture is compatible because the AMI provider needs to verify and explicitly support these instance types.

For your situation where you've manually migrated the OS to AlmaLinux 2 but still can't change to newer instance families, this is because the instance is still tied to the original Marketplace AMI's restrictions. The instance type compatibility is determined at the AMI level, not just by the operating system running on it.

There isn't a simple metadata or kernel configuration change you can make to an existing instance to enable support for newer instance families. The compatibility is determined by several factors including:

  1. Architecture compatibility (x86_64 vs ARM)
  2. Virtualization type (PV vs HVM)
  3. Network adapter support
  4. Enhanced networking driver requirements
  5. NVMe support
  6. Marketplace AMI restrictions

For Marketplace AMIs specifically, the provider must perform proper operation verification before adding support for new instance types, which is why automatic addition of new instance types isn't implemented.

Unfortunately, the most reliable solution would be to create a new AMI from your migrated instances and launch new instances from that AMI. This would disconnect the instance from the original Marketplace AMI restrictions.

If you want to avoid recreating the instances completely, you could try:

  1. Creating an AMI from your current instance
  2. Modifying the AMI attributes to support IMDSv2 (which is often required by newer instance types)
  3. Launching a new instance from this AMI with the desired instance type

For the AMI modification, you could use the AWS CLI command:

aws ec2 modify-image-attribute --image-id ami-id --imds-support v2.0

However, this approach still requires creating new instances rather than changing the instance type of existing ones.
Sources
Configure instance metadata options for new instances - Amazon Elastic Compute Cloud
Feature Request: EC2 Instance Type Compatibility Matrix for Stop/Start Operations Across Families | AWS re:Post
Compatibility for changing the instance type - Amazon Elastic Compute Cloud
Instance Type Upgrade Fails with AMI Marketplace Debian - The instance configuration for this AWS Marketplace product is not supported | AWS re:Post

answered a year ago

AWS
EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.