Amazon Linux 2 EOL ยท EOLkits
End of support: 2026-06-30

Amazon Linux 2 End of Life: June 30, 2026 โ€” What Breaks and How to Migrate

Amazon Linux 2 stops receiving security updates and bug fixes on June 30, 2026. This guide explains what actually breaks, lets you check your own build configuration in the browser, and walks through migrating to Amazon Linux 2023.

--
Days
--
Hours
--
Minutes
--
Seconds

Instant compatibility checker

Paste a Dockerfile, an /etc/os-release file, a Packer or Terraform snippet, EC2 user data, or any yum-based provisioning script. The checker flags patterns that break on Amazon Linux 2023 and explains what to change.

Your input never leaves your browser. The scan runs entirely in client-side JavaScript with no network calls.

What end of life actually means

End of support (EOS) on June 30, 2026 is the date AWS stops shipping updates for Amazon Linux 2. Concretely:

Amazon Linux 2 vs Amazon Linux 2023: key differences

These are the changes most likely to break automation, container images, and provisioning scripts.

AreaAmazon Linux 2Amazon Linux 2023What it means for you
Package manageryumdnf (a yum shim exists but is deprecated)Prefer dnf in scripts. yum still resolves to dnf, but rely on dnf semantics.
Extra packagesamazon-linux-extras topicsRemovedPackages such as nginx, PostgreSQL, and others are installed directly with dnf install, no extras enable step.
RepositoriesSingle rolling repo, latest alwaysDeterministic, version-locked repos (releasever)Updates are opt-in and reproducible. Builds pin a specific version instead of always pulling latest.
PythonPython 2.7 present; /usr/bin/python often Python 2Python 2 removed; Python 3 only (3.9)Anything invoking python/python2 or relying on the Python 2 interpreter must move to Python 3.
Time synchistorically ntpd-based toolingchrony (with Amazon Time Sync)Remove ntp/ntpd packages and config; use chrony.
Firewalllegacy iptablesnftables backend (iptables-nft)Raw iptables rule scripts and iptables-services assumptions should be reviewed against nftables.
Control groupscgroup v1cgroup v2 (unified hierarchy)Container runtimes and resource-limit tooling must support cgroup v2.
Scheduled taskscronsystemd timers (cron still available)Review crontab-based provisioning; systemd timers are the documented approach.
Init loggingrsyslogsystemd journalLog shippers reading /var/log/messages may need to read the journal instead.
SELinuxpermissive / not enforced by defaultAvailable and can be enforcedWorkloads should be tested under SELinux policies.
Instance metadataIMDSv1 commonly usedAL2023 AMIs default to IMDSv2-onlyCode reading instance metadata must use the IMDSv2 token flow.
Base OS image tagamazonlinux:2amazonlinux:2023Update container base images and any AMI lookups that match amzn2.

Migration checklist: AL2 to AL2023

  1. Inventory where AL2 is used. Container base images (FROM amazonlinux:2), EC2 launch templates and AMI IDs, EKS/ECS node AMIs, Packer templates, and Terraform AMI data sources.
  2. Run the checker above against each Dockerfile, user-data script, and provisioning playbook to surface the concrete breaking patterns.
  3. Switch package commands from yum to dnf and replace every amazon-linux-extras install X with a direct dnf install X.
  4. Remove Python 2 dependencies. Repoint scripts to python3 and verify any tooling that assumed /usr/bin/python was Python 2.
  5. Pin a releasever. Adopt the deterministic repository model so builds are reproducible instead of relying on a rolling latest.
  6. Update base images and AMIs. Move container images to amazonlinux:2023 and switch launch templates / node groups to AL2023 AMIs.
  7. Validate runtime assumptions. Confirm cgroup v2, IMDSv2 token usage, chrony for time sync, and nftables-compatible firewall rules.
  8. Test, then cut over. Build the AL2023 image, run your full test suite, deploy to a canary, then roll out before June 30, 2026.

Automate the inventory

The open-source EOLkits CLI runs the same checks across an entire repository or image set, so you do not have to paste files one at a time.

Next steps

Frequently asked questions

When does Amazon Linux 2 reach end of life?

June 30, 2026. After that date AWS no longer provides security updates, bug fixes, or new packages for Amazon Linux 2.

What happens to my instances after the EOL date?

Running EC2 instances continue to operate, but they stop receiving patches. AWS also deprecates the AL2-based ECS-optimized and EKS-optimized AMIs, so managed compute should move to AL2023 AMIs.

Can I upgrade AL2 to AL2023 in place?

No. AL2023 is a new major release with no supported in-place upgrade. You launch new AL2023 instances or rebuild your images on AL2023.

What is the biggest breaking change?

The move from yum to dnf, the removal of amazon-linux-extras, the removal of Python 2, and deterministic version-locked repositories replacing the AL2 rolling repository.

Is Amazon Linux 2023 free, and how long is it supported?

Yes, AL2023 is provided at no additional cost beyond compute, and each AL2023 release receives five years of support.