Amazon Linux 2 end of life: what to do now
Amazon Linux 2 reached end of support on 30 June 2026. There is no in-place upgrade, so every AL2 instance is a rebuild. Here is how to choose where to go, and what to check before you move.
- End of support
- 30 June 2026, 129 days ago
- Paid extension
- None from AWS
- Move to
- AL2023 (to June 2029) or Ubuntu 26.04 (to May 2031)
- Path
- A rebuild on a new instance. No in-place upgrade
What end of life means for AL2
Your AL2 instances keep running, and yum still installs from the existing repositories. What has stopped is new security fixes: any flaw found in the kernel, OpenSSL, OpenSSH or the rest of the system since July 2026 stays open.
Other AWS services are moving on as well. Managed images, agents and service integrations drop AL2 one by one, so an estate left on it gets harder to run as well as less safe.
Unlike Ubuntu or CentOS, AL2 has no paid extension to buy time with. Every AL2 instance needs a plan to be replaced.
Where to go
| Option | Supported to | Good for | Watch out for |
|---|---|---|---|
| Amazon Linux 2023 | June 2029 | Teams used to RHEL-style tooling (dnf, SELinux) and tight AWS integration, with no OS licence cost | No EPEL, a smaller package set, and a shorter runway than Ubuntu |
| Ubuntu 26.04 LTS | May 2031 (May 2036 with Ubuntu Pro) | A longer life, a much larger package archive, and the same OS as servers elsewhere | A change of package manager and file layout, so more of the configuration is rewritten |
| Containers | Depends on the base image | Applications already built as images, moving to ECS or EKS on AL2023 hosts | A bigger change than an OS move, best done as its own project |
Dates from AWS's Amazon Linux 2 FAQ and Canonical's release cycle page, read 6 November 2026.
What changes from AL2 to AL2023
AL2023 is closer to Fedora and CentOS Stream than to AL2, so more changes than the version number suggests.
| Area | AL2 | AL2023 | What to watch |
|---|---|---|---|
| Packages | yum | dnf | yum still works as an alias, but plugins and scripts that rely on its internals need checking. |
| Extra software | extras, EPEL | neither | amazon-linux-extras is gone and EPEL is not supported. Anything installed from them needs another source, a container or a build. |
| Scheduled jobs | cron | systemd timers | cron is not installed by default. Install cronie or move the jobs to timers, but don't find out on the first night. |
| Logs | rsyslog | journald | No /var/log/messages by default. Log shippers and logrotate rules that read files need changing, or rsyslog installed. |
| Python | 2.7 and 3 | 3 only | Python 2 scripts, including old admin and deploy scripts, stop running. |
| Instance metadata | IMDSv1 allowed | IMDSv2 required | Code that calls 169.254.169.254 without a token gets nothing back. Old SDKs and hand-written scripts are the usual cause. |
| Updates | rolling | locked to a release | AL2023 pins its repositories to a dated release. Patching means moving the release version on deliberately, which suits a weekly window but needs building into it. |
| Networking | dhclient | systemd-networkd | Custom interface scripts and extra IP addresses are set up differently. |
| Other | — | — | /tmp is a RAM disk, lsb_release is gone, 32-bit packages are gone, and the SSH server's defaults are stricter. |
Before you move
Find every AL2 instance. cat /etc/os-release on each one, or filter the EC2 console by AMI. Include Auto Scaling launch templates and Elastic Beanstalk environments, which build new AL2 instances by themselves.
List what came from outside the base system. amazon-linux-extras list shows the extras topics in use, and yum repolist shows EPEL and other repositories. Each one needs a replacement on the new system.
Find the scheduled jobs and logs. crontab -l for each user, plus /etc/cron.d, and anything that reads /var/log/messages.
Find IMDSv1 calls. Search the code and scripts for 169.254.169.254, and check the instance's metadata metrics in CloudWatch for calls made without a token.
Write the build down. Since this is a rebuild anyway, build the new instance from a script or playbook rather than by hand, so the next move is easier.
Run old and new side by side, test every site and job on the new instance, then switch the load balancer, Elastic IP or DNS. Keep the AL2 instance stopped, not terminated, until you are sure.
How I run the move
- 01Inventory and a fixed quote
What runs on each instance, what depends on it, and which of the changes above will bite. AL2023 or Ubuntu, with the reasons.
- 02Rehearsal on staging
A copy upgraded or rebuilt first, every site and job tested, every problem fixed there.
- 03The window, with a way back
The real move at a time you agree, the old server or a snapshot kept ready, then two weeks' stabilisation.
Upgrades and migrations →
Questions
When did Amazon Linux 2 reach end of life?
On 30 June 2026, after AWS had extended it several times from the original 2023 date. AL2 no longer gets standard security updates.
Can I upgrade Amazon Linux 2 to Amazon Linux 2023 in place?
No. There is no in-place path from AL2 to AL2023. The move is a new instance built on AL2023, with the application, data and configuration brought across, then a switch-over.
Is there paid extended support for Amazon Linux 2?
AWS has not offered one. Its advice is to move to AL2023 now rather than wait for a later release.
Should I move to Amazon Linux 2023 or Ubuntu?
AL2023 if the team knows the RHEL-style tooling and leans on AWS integrations; it is supported to June 2029. Ubuntu 26.04 if you want a longer runway (to May 2031, or 2036 with Ubuntu Pro), a larger package archive, or the same OS as your other servers.
Do AL2 instances stop working?
No. Running instances carry on. What stops is new security fixes, and over time other AWS services drop AL2 support: AWS Batch dropped its EKS-optimised AL2 images in November 2025.
What breaks most often when moving to AL2023?
Cron jobs (there is no cron by default), anything that relied on EPEL or amazon-linux-extras, Python 2 scripts, and code that reads instance metadata without an IMDSv2 token.
Still running Amazon Linux 2?
Tell me what's on the instances. I'll tell you where to move them and give you a fixed quote for the rebuild.