Amazon Linux 2 reached end of support on June 30, 2026, and AWS did not extend it again, so an Amazon Linux 2 to Amazon Linux 2023 migration is now overdue rather than upcoming. There is no in-place OS upgrade: every AWS migration guide (ECS, EKS, Elastic Beanstalk) works by building new AL2023 images or launch templates and replacing instances. Budget most of your effort for user data and configuration management, because AL2023 changes the package manager, drops amazon-linux-extras and EPEL, locks repositories to versions, requires IMDSv2, switches to cgroup v2, and no longer installs cron or rsyslog by default.
Where Amazon Linux 2 Stands in November 2026
The Amazon Linux 2 FAQ is blunt: AL2 "reached its end of support on 2026-06-30" and "is no longer receiving standard security updates."
One detail confuses people. The AL2 release notes still list package releases after EOL, such as 2.0.20261112.0 on November 12, 2026, each with a banner saying AL2 reached end of life. Do not read that as a support commitment. The FAQ is the contract, and it says remaining on AL2 "carries increasing risk as new vulnerabilities are no longer patched."
The managed services built on AL2 have their own timelines:
| Service | AL2 status (as of November 2026) | What to move to |
|---|---|---|
| EC2 | End of support June 30, 2026 | AL2023 AMIs via SSM public parameters |
| ECS-optimized AMI | No new AL2 ECS AMIs after June 30, 2026 (ECS guide) | ECS-optimized AL2023 AMI |
| EKS-optimized AMI | AL2 AMIs stopped November 26, 2025; none for Kubernetes 1.33+ (EKS guide) | AL2023 or Bottlerocket |
| Elastic Beanstalk | All AL2 platform branches set to retired on August 6, 2026 (retiring platforms) | AL2023 platform branches |
Lambda provided.al2 |
Deprecated July 31, 2026; create blocked July 29, 2027; update blocked August 31, 2027 | provided.al2023 |
Lambda java8.al2, java11, java17 (AL2) |
Deprecation June 30, 2027 | java8.al2023, java11.al2023, java17.al2023, or java21/java25 |
Lambda python3.11 (AL2) |
Deprecation June 30, 2027 | python3.12 or later |
Lambda dates are from the Lambda runtimes page, which says the AL2-based runtimes still get patches for critical and selected important AL2 issues until their own deprecation dates.
AL2023 itself is supported until June 30, 2029: standard support with quarterly minor releases ends June 30, 2027, followed by a maintenance phase with security and critical fixes only. AWS has not published details of the next major version, so plan on AL2023 for this cycle.
What Actually Changes Between AL2 and AL2023
AWS keeps a full comparison of AL2 and AL2023. These are the differences that break real workloads:
| Area | AL2 | AL2023 | What breaks |
|---|---|---|---|
| Package manager | yum |
dnf (a yum command still exists, backed by DNF) |
Scripts using yum-only plugins or yum-config-manager habits |
| Extras | amazon-linux-extras topics |
Gone; versioned packages in the core repo | Every amazon-linux-extras install line |
| EPEL | EPEL7 widely used | No binary-compatible EPEL; SPAL offers EPEL9 rebuilds | Any epel-release install |
| Updates | Rolling repos; cloud-init applied security updates at launch | Repos locked to the AMI's release version | Instances silently stay on old packages |
| IMDS | IMDSv1 allowed unless the instance or account requires v2 | AMI sets ImdsSupport to v2.0: IMDSv2 required, hop limit 2 |
Old SDKs and curl scripts without a token |
| cgroups | v1 | v2 | JVM heap sizing, container memory metrics |
| Scheduling | cronie installed |
Not installed by default | crontab missing |
| Logging | rsyslog, /var/log/messages |
systemd-journald; no rsyslog by default |
Log shippers tailing /var/log/messages |
| Networking | dhclient |
systemd-networkd |
Custom network scripts |
| SELinux | Check yours with getenforce |
Enabled, permissive by default |
Nothing yet, but denials now get logged |
| SSH | ssh-rsa signatures accepted |
ssh-rsa disabled; UseDNS=no |
Old clients and RSA-SHA1 keys; hostname-based from= in authorized_keys |
/tmp |
On root volume | tmpfs, 50% of RAM |
Jobs writing large temp files |
| Python | 2.7 present | Python 3 only | Anything still on Python 2 |
| Kernel | 4.14 and 5.10 (5.4 and 5.15 via Extras) | 6.1, 6.12, 6.18 (default 6.18 for new launches since August 17, 2026) | Out-of-tree kernel modules, agents |
| Other | 32-bit libs, lsb_release |
Neither shipped | Legacy binaries, scripts parsing lsb_release |
Time sync is one thing that does not change: both use chrony, and AL2023 ships an amazon-chrony-config package with the Amazon defaults.
Versioned repositories in practice
This is the change teams underestimate. AL2023 deterministic upgrades mean an instance launched from an AMI keeps pointing at that AMI's repository snapshot. dnf upgrade alone will not pull packages from newer releases. Two ways to work with it:
# See which newer repository versions exist
sudo dnf check-release-update
# Move this instance to a specific release (reproducible across a fleet)
sudo dnf upgrade --releasever=2023.12.20261112
# Or preview everything in the newest release
sudo dnf check-update --releasever=latest
If you genuinely want rolling behavior, AWS documents a persistent override with echo latest | sudo tee /etc/dnf/vars/releasever. My recommendation is the opposite for production: keep instances locked, and get updates by rebuilding AMIs from the latest SSM parameter on a schedule. Pinning --releasever in user data gives you identical packages across every instance in an Auto Scaling group, which AL2 never did.
EPEL replacements
If you depended on EPEL7, check the EPEL page first: many packages (git-lfs, inotify-tools, jemalloc, stress-ng) are now in the core repo. For the rest, AL2023 release 2023.9.20251117 and later can enable Supplementary Packages for Amazon Linux with sudo dnf install spal-release. Read the support statement: SPAL packages are not covered by AWS Support Plans and get no AWS CVE tracking, so treat them like any other third-party repo.
Pre-Migration Checklist
Run this inventory on a representative AL2 instance of each role before you write a single line of new user data.
# Installed packages, for diffing against the AL2023 build later
rpm -qa --qf '%{NAME}\n' | sort -u > al2-packages.txt
# Extras topics and third-party repos you rely on
amazon-linux-extras list | grep enabled
yum repolist enabled
# Scheduled jobs that will lose cron
sudo crontab -l; ls /etc/cron.d /etc/cron.daily /etc/cron.hourly
# Python 2 and 32-bit leftovers
rpm -qa | grep -E '^python2|\.i686$'
# Scripts that call the metadata service directly
sudo grep -rl '169.254.169.254' /etc /opt /usr/local 2>/dev/null
Then work through the list:
- IMDSv1 usage. Check the
MetadataNoTokenCloudWatch metric for each instance; a non-zero value means something still makes IMDSv1 calls and will break on AL2023. The IMDSv2 transition guide also points to the open-source IMDS Packet Analyzer to find the offending process. - Agents and kernel modules. Confirm that security, monitoring and backup agents publish AL2023 builds for kernel 6.x.
- Packages. Build an AL2023 test instance, install your packages, run the same
rpm -qacommand and compare the two lists in a diff checker. - Logs. Point log shippers at the journal or install
rsyslogdeliberately. - Java and containers. Find JVMs and anything else that reads cgroup memory limits; cgroup v2 changes what they see.
- SSH clients. Old Jenkins agents, Ansible controllers and appliances that only speak
ssh-rsawill fail to connect.
Rebuild the AMI and Launch Template
Reference the AL2023 AMI through the public SSM parameter so new launches always get the current image:
aws ec2 create-launch-template-version \
--launch-template-name web-asg \
--source-version '$Latest' \
--version-description al2023 \
--launch-template-data '{"ImageId":"resolve:ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64"}'
aws ec2 describe-launch-template-versions \
--launch-template-name web-asg --versions '$Latest' --resolve-alias
The parameter names are listed in the AL2023 EC2 guide: swap x86_64 for arm64 on Graviton (Graviton2 or later; A1 is not supported), use al2023-ami-minimal-... for the minimal image, or pin a kernel line with names such as al2023-ami-kernel-6.12-x86_64 if an agent is not certified on 6.18 yet. Then roll the group with an instance refresh. One limitation from the Auto Scaling docs: with an SSM parameter in the launch template, you cannot start an instance refresh with a desired configuration or skip matching, and warm pools are not supported.
Rewrite User Data and cloud-init
A typical AL2 user data script needs three kinds of edits. Before:
#!/bin/bash
yum update -y
amazon-linux-extras install -y nginx1
yum install -y cronie
echo "0 3 * * * root /opt/app/cleanup.sh" > /etc/cron.d/cleanup
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
After, for AL2023:
#!/bin/bash
set -euo pipefail
# Pin the repository version so every instance gets identical packages
dnf upgrade -y --releasever=2023.12.20261112
dnf install -y nginx
cat > /etc/systemd/system/cleanup.service <<'EOF'
[Unit]
Description=Nightly cleanup
[Service]
Type=oneshot
ExecStart=/opt/app/cleanup.sh
EOF
cat > /etc/systemd/system/cleanup.timer <<'EOF'
[Unit]
Description=Run cleanup daily at 03:00
[Timer]
OnCalendar=*-*-* 03:00:00
Persistent=true
[Install]
WantedBy=timers.target
EOF
systemctl daemon-reload
systemctl enable --now cleanup.timer nginx
# IMDSv2: get a session token first
TOKEN=$(curl -sX PUT "http://169.254.169.254/latest/api/token" \
-H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
INSTANCE_ID=$(curl -s -H "X-aws-ec2-metadata-token: $TOKEN" \
http://169.254.169.254/latest/meta-data/instance-id)
Replace the release version with the one you have tested; the AL2023 release notes list them. If you cannot rewrite every cron job yet, dnf install -y cronie followed by systemctl enable --now crond restores classic cron, but AWS recommends systemd timers, and they give you logging through journalctl -u cleanup for free.
Two cloud-init behaviors changed as well. AL2023's cloud-init no longer installs security updates at boot by default, which is why the pinned dnf upgrade line exists. And if your #cloud-config includes remote content that cannot be fetched, AL2023 treats it as a fatal error instead of silently continuing, so a broken URL now stops the boot sequence rather than producing a half-configured instance.
Service-Specific Migration Paths
ECS on EC2
Create a new capacity provider backed by an Auto Scaling group using the ECS-optimized AL2023 AMI (/aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id), add it to the cluster with a low weight, and shift weight across as tasks prove healthy. The big gotcha is memory. On cgroup v2, a container in a task with only a task-level memory limit cannot see that limit, so the JVM sizes its heap from host memory and risks OOM kills. Either set container-level memory in the task definition or set ECS_PROPAGATE_TASK_MEMORY_LIMIT_CGROUPV2=true in /etc/ecs/ecs.config (ECS agent 1.104.0 or later). Also expect reported memory utilization to rise, because cgroup v2 counts page cache.
EKS nodes
AL2023 replaces bootstrap.sh with nodeadm, configured through a NodeConfig YAML document. Managed node groups without a custom launch template and Karpenter handle this for you; for Karpenter, set amiFamily: AL2023 on the EC2NodeClass, and if you are still choosing a node autoscaler, see our Karpenter vs Cluster Autoscaler comparison. Self-managed groups and custom AMIs must supply the cluster name, API endpoint, certificate authority and service CIDR explicitly:
apiVersion: node.eks.aws/v1alpha1
kind: NodeConfig
spec:
cluster:
name: my-cluster
apiServerEndpoint: https://example.com
certificateAuthority: Y2VydGlmaWNhdGVBdXRob3JpdHk=
cidr: 10.100.0.0/16
kubelet:
config:
maxPods: 110
flags:
- --node-labels=team=payments
Per the EKS guide, AL2023 nodes need VPC CNI 1.16.2 or later and eksctl 0.176.0 or later. Managed node groups launched without a launch template default to an IMDS hop limit of 1, so pods lose access to node credentials; use EKS Pod Identity rather than raising the limit.
Elastic Beanstalk
AL2 branches are retired, so create a new environment on the matching AL2023 platform branch, deploy the same application version, test, and swap environment URLs (blue/green). Review .ebextensions commands for yum and amazon-linux-extras usage before you deploy.
Lambda
For provided.al2, change the runtime to provided.al2023 and rebuild native binaries; AL2023 ships a newer glibc, and the runtime uses dnf instead of yum if your container image installs packages. For Java on AL2, the lowest-friction move is the matching .al2023 runtime, which keeps your Java version. If you are restructuring functions anyway, our Lambda durable functions tutorial covers the newer execution model.
Gotchas Worth a Test Case
- Silent staleness. An AL2023 instance that runs for months on its launch-time repository gets no new packages from plain
dnf upgrade. Rebuild AMIs or pin newer--releasevervalues on a schedule. - SELinux denials are logged. Permissive mode records denials without blocking. If you plan to move to enforcing later, collect them now.
/tmpfills RAM. Build tools and data jobs that write gigabytes to/tmpshould use/var/tmpor a dedicated volume.- Default kernel moved. New launches from the default-kernel parameter boot 6.18 since August 17, 2026, so test against the kernel you will actually get.
- FIPS. AL2 was validated under FIPS 140-2, AL2023 under FIPS 140-3, and FIPS mode must be enabled explicitly.
Frequently Asked Questions
When did Amazon Linux 2 reach end of life?
June 30, 2026, per the AL2 FAQ. After that date AL2 no longer receives standard security updates. Some package updates still appear in the release notes, but AWS does not present them as continued support, so plan as if no fixes are coming.
Can I upgrade Amazon Linux 2 to Amazon Linux 2023 in place?
AWS does not document an in-place OS upgrade path, and every AWS service migration guide replaces instances instead. Build a new AL2023 AMI or launch template, move configuration with updated user data or your configuration management tool, and cut over with blue/green or rolling replacement.
Is EPEL available on Amazon Linux 2023?
No EPEL release is binary compatible with AL2023. Many former EPEL7 packages are in the AL2023 core repository, and SPAL provides EPEL9-derived builds on recent AL2023 releases, but SPAL packages are not covered by AWS Support and have no AWS CVE tracking.
Why does dnf upgrade not install the latest packages on AL2023?
Because repositories are versioned and each AMI locks to its release. Run sudo dnf check-release-update to see newer versions, then sudo dnf upgrade --releasever=<version> to move to one. Launching from the latest AMI also gets you current packages.
How long is Amazon Linux 2023 supported?
Until June 30, 2029. Standard support with quarterly minor releases ends June 30, 2027, and the remaining two years are a maintenance phase with security updates and critical bug fixes only.
Conclusion
The Amazon Linux 2 to Amazon Linux 2023 migration is less about the OS and more about the scripts around it. Inventory packages, cron jobs, IMDSv1 calls and log paths on AL2; rebuild user data around dnf, pinned --releasever, systemd timers and IMDSv2 tokens; then replace instances through launch templates, capacity providers, node groups or Beanstalk environment swaps. AL2 is already past end of support, so prioritize internet-facing fleets first and treat every remaining AL2 instance as an open vulnerability exception with an owner and a date.