Join our Newsletter — 33% off our NHI Course
Home› Guides› Amazon Linux 2 End of Life Guide: June…
Guide Vulnerability Management

Amazon Linux 2 End of Life Guide: June 2026 Deadline and Migration Security

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 18 November 2026 12 min read
On this page

Amazon Linux 2 reached end of support on 30 June 2026, so any AL2 instance, AMI or container image still running today is no longer receiving standard security updates and should be migrated, isolated or retired. AL2 was the default Linux for EC2 for years, which means many estates carry it in places nobody thinks about: build agents, bastion hosts, golden AMIs, EKS node groups and base container images. This guide covers what end of support means, how to find every AL2 workload, the security changes you will meet when moving to Amazon Linux 2023, and how to run the migration without creating new exposure on the way.

Status as of 17 Nov 2026: AWS's Amazon Linux 2 FAQ states that AL2 reached end of support on 30 June 2026 and is no longer receiving standard security updates. The FAQ names no further extension and no extended support offering. Amazon Linux 2023 is supported until 30 June 2029. Check the AWS lifecycle pages linked below before making decisions, because vendor positions can change.

For the general lifecycle model across operating systems, see the Operating System End of Life and Extended Support Guide. This page is specific to Amazon Linux 2.

This is an independent guide from NHI Mgmt Group, based on AWS's public documentation as of November 2026. It is not sponsored or reviewed by AWS. Product features change, so confirm settings against AWS's current documentation.

Key takeaways

  • AL2 end of support was 30 June 2026. New vulnerabilities in AL2 packages are no longer patched by standard security updates, so every remaining instance accumulates unpatched risk.
  • AWS recommends Amazon Linux 2023 (AL2023) as the migration target. AL2023 has five years of support: standard support to 30 June 2027 and maintenance to 30 June 2029.
  • AL2023 is not an in-place upgrade from AL2. Plan rebuilds: new AMIs, new launch templates, retested user data and configuration management.
  • Several AL2023 defaults change security behaviour: ssh-rsa signatures are disabled, cloud-init no longer installs security updates at boot, and repositories are versioned. Each can break automation if you do not plan for it.
  • The hardest AL2 workloads to find are the ones nobody owns. Inventory AMIs, images and node groups, not just running instances.

What end of support means for AL2

AWS's Amazon Linux 2 FAQ states that AL2 reached end of support on 30 June 2026 and is no longer receiving standard security updates, so new vulnerabilities go unpatched. Before that date, AL2 ran under a long-term support policy that covered core packages with security updates and bug fixes, while Extras topics were exempt. The FAQ does not say whether that policy applies after end of support, and it does not describe what happens to AL2 repositories or AMIs. Do not plan on the basis that packages will remain installable from AWS repositories indefinitely.

In practice the risk builds in three ways:

  • Unpatched packages. Each new CVE in OpenSSL, the kernel, glibc, sudo or OpenSSH that affects AL2 stays open. Vulnerability scanners will keep reporting them, and the findings will not clear.
  • Compliance findings. Most control frameworks treat unsupported components as a finding in their own right. NIST SP 800-53 Rev. 5 has a specific control, SA-22 Unsupported System Components, alongside SI-2 Flaw Remediation.
  • Ecosystem drift. Agents, runtimes and tools gradually stop supporting AL2. The FAQ also notes that AL2 FIPS-validated modules are moving to historical status, which matters for any workload with a FIPS requirement.

Kernel live patching, which AWS documented for the AL2 default kernel on x86_64, is not a substitute: it covered kernel fixes only, for a limited window per kernel, and does nothing for user-space packages. The Linux Kernel Live Patching Guide covers where live patching fits in general.

Find every AL2 workload

AL2 hides in more places than running EC2 instances. Build the inventory across all of these:

WhereHow to find it
Running EC2 instancesInstance platform details, Systems Manager inventory, or /etc/os-release reporting VERSION_ID="2"
AMIs and golden imagesYour AMI pipeline and shared AMIs; an AL2 base image recreates the problem on every launch
Launch templates and Auto Scaling groupsTemplates that reference AL2 AMI IDs or AL2 SSM parameter paths
EKS and ECS node groupsNode AMI type and version in each cluster and capacity provider
Container imagesBase images built FROM amazonlinux:2 in registries and Dockerfiles
Build and CI agentsSelf-hosted runners and build fleets, often outside normal patch reporting
Infrastructure as codeTerraform, CloudFormation and CDK definitions that pin AL2 AMIs
Third-party appliancesMarketplace products built on AL2; ask the vendor for their plan

Record an owner for each item. Ownerless AL2 hosts are usually the ones with the oldest credentials on them, which makes them a non-human identity problem as well as a patching problem: instance profiles, SSH keys and long-lived access keys sitting on an unpatched host. Review what each host can reach before you decide how long it can stay.

Decide: migrate, isolate or retire

Each AL2 workload should land in one of four outcomes, with a date:

  • Migrate to AL2023. The default for anything that will keep running. AWS recommends migrating now rather than waiting for a future release, citing FIPS certification, newer package versions and performance improvements.
  • Containerise legacy dependencies. AL2023 ships no 32-bit userspace packages. For legacy 32-bit binaries, AWS suggests running AL2 userspace in an AL2 container on AL2023. Treat that as a contained exception with its own risk acceptance, not as a way to keep AL2 indefinitely.
  • Isolate temporarily. If a workload cannot move yet, reduce its exposure: remove inbound internet access, restrict security groups, cut the instance profile to the minimum, and set a review date. Document it as a risk acceptance with a named owner.
  • Retire. Many AL2 hosts turn out to be idle. Decommissioning is the fastest fix; remember to delete the AMIs, snapshots, keys and IAM roles that went with them.

The Technology End of Life Policy Template gives a policy basis for exceptions and their expiry.

AL2023 security changes to plan for

AWS's comparison of AL2023 and AL2 lists the differences. The ones that change security behaviour, and so need testing, are below.

Patching model

  • Versioned repositories and deterministic upgrades. AL2023 uses versioned repositories and releasever, so an instance stays on a fixed package state until you move it. That is good for reproducibility, but it means a host does not pick up security fixes unless your process moves the release version or rebuilds from a newer AMI.
  • cloud-init no longer installs security updates by default. On AL2, cloud-init installed security updates at boot. AWS states this is not the default on AL2023. Any fleet that relied on "patch at launch" needs an explicit patching step.
  • DNF replaces YUM. Update scripts, Ansible roles and SSM documents that call yum need review.
  • Package support status. AL2023 can report support status per package with dnf supportinfo, which helps track lifecycle at package level.

SSH and access

AWS documents that the AL2023 AMI changes the default sshd configuration:

  • ssh-rsa signatures are disabled by default. Clients must support rsa-sha2-256 or rsa-sha2-512, or use ssh-ed25519 keys. Old automation tools and libraries that only speak ssh-rsa will fail.
  • Different host key types are generated, and some legacy types are no longer generated at launch. Known-hosts pinning in automation will change.
  • UseDNS no is the default, so from=hostname restrictions in authorized_keys are no longer resolved and must be replaced with IP addresses. A restriction that silently stops matching is a security regression, so test it.

The migration is a good moment to remove SSH keys altogether where Systems Manager Session Manager can replace them, and to rotate any keys that survive.

Platform defaults

  • cloud-init fails closed. AWS states that unavailable remote resources create a fatal error in AL2023, where AL2 did not alert. User data that fetched scripts from a URL will now stop the boot rather than continue half-configured.
  • SELinux. cloud-init works with SELinux on AL2023, and AWS documents how to enable enforcing mode. See the SELinux Guide before you turn it on for production workloads.
  • UEFI Preferred and Secure Boot are supported, and the unified cgroup v2 hierarchy is used.
  • Logging and scheduling. The systemd journal replaces rsyslog and systemd timers replace cron. Log shipping agents and SIEM parsers that read /var/log/messages need checking, or you lose host telemetry on migration day.
  • Runtimes. Python 2.7 is replaced with Python 3, Amazon Corretto is the default JVM, and lsb_release is removed in favour of /etc/os-release. Scripts that parse lsb_release to decide behaviour will break.
  • /tmp is tmpfs. Anything that stored state in /tmp across reboots will lose it.

Run the migration securely

Migration windows are when security controls quietly lapse. A sequence that keeps them in place, offered as an NHI Mgmt Group recommendation:

  1. Build a hardened AL2023 golden AMI first. Apply your CIS or internal baseline, install and test security agents, configure log shipping for the journal, and set the patching process for versioned repositories. The Linux Server Hardening Guide covers the baseline.
  2. Update infrastructure as code and launch templates to the new AMI, and block new launches from AL2 AMIs through policy or pipeline checks.
  3. Rebuild rather than copy. Do not copy whole AL2 file systems to AL2023 hosts; you carry over stale keys, cron jobs and local accounts. Move application data and configuration only.
  4. Re-issue credentials. New instances should get new instance profiles scoped to need, new SSH keys or none, and secrets fetched from a secrets manager at runtime instead of copied files.
  5. Verify telemetry before cutover. Confirm EDR, vulnerability scanning and log forwarding report from each new host.
  6. Decommission the AL2 host fully. Terminate it, delete its AMIs and snapshots, revoke its keys and remove its IAM role.

Track progress weekly against the inventory. The Amazon EC2 Security Guide covers instance-level controls for the new fleet.

Prioritising AL2 hosts that cannot move yet

Large estates rarely finish a migration on schedule, so rank the remaining AL2 hosts by how much damage each could do, and work down the list. The following factors, an NHI Mgmt Group suggestion rather than AWS guidance, give a defensible order:

  • Internet exposure. Hosts reachable from the internet, or sitting behind a load balancer that forwards to them, come first. An unpatched service on an exposed host is the most direct route in.
  • Known exploited vulnerabilities. Cross-reference scanner findings on AL2 hosts against the CISA Known Exploited Vulnerabilities Catalog. A host carrying a vulnerability that is being exploited in the wild should move or be isolated immediately.
  • Identity reach. Check the instance profile, any access keys in files or environment variables, and any SSH keys that open other hosts. An AL2 host whose role can write to production data stores or assume other roles is a high-value pivot point even if it is not exposed.
  • Data sensitivity. Hosts that process regulated or customer data carry compliance weight beyond the technical risk.
  • Replaceability. Stateless hosts behind an Auto Scaling group can often be moved in a day by changing the launch template; prioritise them early to shrink the count quickly and free effort for the hard cases.

For hosts that must wait, apply compensating controls and measure them: no inbound internet, security groups limited to named sources, instance profiles cut to the minimum, IMDS access restricted, and alerting on new outbound connections. Review each exception monthly until it closes.

Plan for the next end of life now

AL2023 itself has a fixed lifecycle. AWS's release cadence page states that AL2023 was released in March 2023, with standard support (quarterly minor versions) ending on 30 June 2027 and a maintenance phase (security updates and critical bug fixes only) ending on 30 June 2029. That gives a migration to AL2023 roughly two and a half years of supported life from today. Build the habits now: keep the inventory live, record OS version on every AMI, and add end-of-life dates to your asset register so the next deadline is a scheduled project rather than a scramble. Teams that went through the CentOS 7 End of Life migration will recognise the pattern.

Common failure patterns

  • Counting instances, not images. Running hosts are migrated, but an AL2 golden AMI or base container image keeps recreating them.
  • Assuming patch at boot still happens. AL2023 cloud-init does not install security updates by default, so new fleets launch with whatever the AMI contained.
  • Breaking SSH automation on cutover. Tools that only support ssh-rsa fail, and teams respond by re-enabling weak algorithms instead of upgrading clients.
  • Losing logs. Agents that read rsyslog files go quiet on AL2023 and nobody notices until an investigation needs them.
  • Copying the old host. Stale keys, local accounts and over-broad instance profiles move to the new OS intact.
  • Open-ended exceptions. Isolated AL2 hosts with no review date become permanent.

Practitioner checklist

  • Inventory AL2 across instances, AMIs, launch templates, node groups, container images, CI agents and IaC, with an owner for each.
  • Assign each workload an outcome (migrate, containerise, isolate, retire) and a date.
  • Build and test a hardened AL2023 golden AMI with agents, log shipping and a patching process for versioned repositories.
  • Block new AL2 launches in pipelines and policy.
  • Test SSH clients and automation against rsa-sha2 or ed25519, and replace hostname-based authorized_keys restrictions.
  • Re-issue instance profiles, keys and secrets for new hosts instead of copying them.
  • Confirm EDR, scanning and log forwarding on every new host before cutover.
  • Document isolated AL2 exceptions as risk acceptances with owners and expiry dates.
  • Record the AL2023 dates (30 June 2027 and 30 June 2029) in the asset register.

Standards and references

Related NHI Mgmt Group resources: Operating System End of Life and Extended Support Guide · CentOS 7 End of Life · Linux Server Hardening Guide · Amazon EC2 Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.