Amazon Linux 2 reaches end of life on June 30, 2026. After that: no security patches, no new AMIs, no extras updates. Anything still pinned to AL2 in a launch template, EKS node group, ECS task, Beanstalk platform, or container base image is running unpatched from that day on.
Here's what actually changes when you move to Amazon Linux 2023 — the stuff that breaks boot scripts and CI.
What changes on AL2023
| Area | Amazon Linux 2 | Amazon Linux 2023 |
|---|---|---|
| Package manager | yum |
dnf (a yum symlink remains) |
| Extras | amazon-linux-extras |
removed — packages are default, version-namespaced (python3.11, nginx1.24), or in SPAL |
| Time sync | ntpd |
chronyd |
| Firewall | iptables |
nftables |
| Python | 2.7 and 3.x | 3.x only — no Python 2 |
| glibc | 2.26 | 2.34 |
The errors you'll hit (and the fix)
-
amazon-linux-extras: command not found— it doesn't exist on AL2023. Install directly withdnf, version-namespaced, or via SPAL. -
Failed to start ntpd.service: Unit ntpd.service not found— usechronydinstead. -
/usr/bin/env: 'python2': No such file or directory— there's no Python 2; port the script topython3. -
Error: Unable to find a match: <package>— the package was renamed/version-namespaced/moved to SPAL.dnf searchfor the real name.
The migration checklist
- Inventory every AL2 AMI, launch template, EKS node group, ECS task, Beanstalk platform, and container base image.
- Rebuild the base AMI on AL2023 (Packer / EC2 Image Builder).
-
Package manager: move
yumusage todnf, dropamazon-linux-extras. -
Services:
ntpd→chronyd,iptables→nftables. -
Python: port
python2scripts/shebangs topython3. - Test boot, app start, networking, and time sync on a canary.
- Roll out staged (5 → 25 → 50 → 100%) with a tested rollback.
I got tired of grepping for this by hand, so I built a free scanner — drop your Terraform / CloudFormation / Packer / Ansible into the browser and it flags every AL2 reference and the errors above, with the AWS source for each. Nothing is uploaded. Try it free → eolkits.com/scan. There's also an MIT CLI that does the codemods, and a paid audit if you want it done for you.
Full checklist with the per-error fixes: eolkits.com/amazon-linux-2-eol-checklist
Top comments (0)