Amazon Linux 2022 is in preview release and is subject to change.
Naming and versioning
Amazon Linux 2022 (AL2022) provides a minor release every three months. Each release is identified by an increment from 0 to N. 0 refers to the original major release for that iteration.
For example, minor releases of Amazon Linux 2022 have the following format:
-
2022.0.20220301
-
2022.1.20220601
-
2022.2.20220901
The corresponding Amazon Linux 2022 AMIs have the following format:
-
al2022-ami-2022.0.20220301.0-kernel-5.15-x86_64
-
al2022-ami-2022.1.20220601.0-kernel-5.15-x86_64
-
al2022-ami-2022.2.20220901.0-kernel-5.15-x86_64
Within a specific minor version, regular AMI releases occur with a timestamp of the date of the AMI release.
-
al2022-ami-2022.0.20220301.0-kernel-5.15-x86_64
-
al2022-ami-2022.0.20220410.0-kernel-5.15-x86_64
-
al2022-ami-2022.0.20220520.0-kernel-5.15-x86_64
The recommended method for identifying an Amazon Linux 2 or Amazon Linux 2022 instance starts with reading the Common Platform
Enumeration (CPE) string from /etc/system-release-cpe
. Then, split the string into its fields. Last, read
the platform and version values.
Amazon Linux 2022 also introduces new files for platform identification:
-
/etc/amazon-linux-release
symlinks to/etc/system-release
-
/etc/amazon-linux-release-cpe
symlinks to/etc/system-release-cpe
These two files indicate that an instance is Amazon Linux. There's no need to read a file or split the string into fields, unless you want to know the specific platform and version values.