- Newest
- Most votes
- Most comments
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
Note, CentOS 7 reached its end of life (EOL) on June 30, 2024 according to RedHat - are you sure you want to use this.
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:
- Architecture compatibility (x86_64 vs ARM)
- Virtualization type (PV vs HVM)
- Network adapter support
- Enhanced networking driver requirements
- NVMe support
- 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:
- Creating an AMI from your current instance
- Modifying the AMI attributes to support IMDSv2 (which is often required by newer instance types)
- 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
Relevant content
- AWS OFFICIALUpdated 3 years 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.