Instead of guessing which version of RHEL a particular distro is based off, just run:
rpm -E %{rhel}
For Amazon Linux 2, this will give you 7.
Best way to find AMI ID of Amazon Linux 2 for each region for a CloudFormation map?
Migrating an EC2 Amazon Machine Image (AMI) from Amazon Linux 2 to the latest Amazon Linux version 2023
amazon web services - AWS EC2 : upgrade from AMI 1 to AMI 2 - Stack Overflow
Amazon Linux 2025
Optimized performance
Amazon Linux 2 includes support for the latest Amazon Elastic Compute Cloud (Amazon EC2) instance capabilities and is tuned for enhanced performance. It includes packages that help ease integration with other AWS services.
Enhanced developer productivity
Amazon Linux 2 is offered as a virtual machine and container image for on-premises development and testing. Developers can speed up their application development by building, testing, and integrating on the same Linux distribution that is used in their production environment.
Large partner network
Amazon Linux 2 has a rapidly growing community of AWS Partners that includes independent software vendors (ISVs). You can install and run many popular partner applications.
I want to use the Amazon Linux 2 as my AMI ID, but I can't hard code it else the cloudformation will be region bound. But I can't find the information for where the AMI ids for each region is?
Instead of guessing which version of RHEL a particular distro is based off, just run:
rpm -E %{rhel}
For Amazon Linux 2, this will give you 7.
There's a discussion thread available over on the AWS forums that indicates the officially supported Amazon Linux AMI is not based upon any Linux distribution. Rather, the Amazon Linux AMI is independently maintained image by Amazon.