Skip to content

feat: migrate EC2 userdata + RegionMap from Amazon Linux 2 to AL2023 - #20

Merged
alexzhangs merged 1 commit into
developfrom
feature/al2023-migration
Jul 13, 2026
Merged

feat: migrate EC2 userdata + RegionMap from Amazon Linux 2 to AL2023#20
alexzhangs merged 1 commit into
developfrom
feature/al2023-migration

Conversation

@alexzhangs

@alexzhangs alexzhangs commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Why

Amazon Linux 2 reaches end of support on 2026-06-30. Existing stacks keep running (security-update cliff, not an outage cliff), but new deployments should land on AL2023.

What

  • RegionMap — regenerated for all 17 regions with the latest AL2023 kernel-default AMIs (al2023-ami-2023.12.20260608.0-kernel-6.1), x86_64 + arm64 in every region. Generated with the AL2023-updated cfn/vpn/ami logic (feat(cfn/vpn/ami): fetch AL2023 AMIs instead of Amazon Linux 2 xsh-lib/aws#14); same key order/indentation, so the x-file-inject anchors contract is intact.
  • userdata:
    • yum install -y docker from the AL2023 core repos (amazon-linux-extras is AL2-only and gone).
    • IMDSv2 token-based metadata curls — AL2023 AMIs default to IMDSv2-required, so the previous bare curls would return 401 and silently empty public_ip/private_ip.
    • yum install -y aws-cfn-bootstrapupdate was a silent no-op when the helper scripts aren't preinstalled, leaving the cfn-signal EXIT trap broken.
    • EnableL2TP: replaced the host install of openswan/xl2tpd from EPEL (not available on AL2023, also missing from SPAL) with the containerized server alexzhangs/xl2tpd-libreswan (libreswan + xl2tpd + bundled chap-manager, env-configured) — the new standalone image repo that supersedes aws-ec2-xl2tpd, mirroring the aws-ec2-shadowsocks-libev → shadowsocks-libev-v2ray relationship. ⚠️ Depends on the xl2tpd-libreswan image being published to DockerHub first (repo needs DOCKERHUB_USERNAME var + DOCKERHUB_TOKEN secret, then a release to trigger ci-docker).
  • README — AL2023 is the recommended AMI; documented that AL2/AL2018 support ends with the pre-AL2023 revisions.

Not included / follow-ups

🤖 Generated with Claude Code

Amazon Linux 2 reaches end of support on 2026-06-30. Changes:

- RegionMap: regenerated for all 17 regions with the latest AL2023
  kernel-default AMIs (x86_64 + arm64 everywhere), via the AL2023-updated
  cfn/vpn/ami logic (SSM /aws/service/ami-amazon-linux-latest/
  al2023-ami-kernel-default-<arch>).
- userdata: yum install docker from the AL2023 core repos
  (amazon-linux-extras is AL2-only); IMDSv2 token-based metadata curls
  (AL2023 AMIs default to IMDSv2-required, bare curls return 401);
  yum install aws-cfn-bootstrap (update was a silent no-op when the
  helper scripts are not preinstalled).
- EnableL2TP: replaced the host install of openswan/xl2tpd from EPEL
  (which AL2023 does not ship) with the containerized server
  alexzhangs/xl2tpd-libreswan (libreswan + xl2tpd + bundled chap-manager,
  env-configured). Requires the xl2tpd-libreswan image to be published
  on DockerHub first.
- README: AL2023 is the recommended/tested AMI now.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alexzhangs
alexzhangs force-pushed the feature/al2023-migration branch from 335f03e to 8410ea2 Compare June 11, 2026 06:21
@alexzhangs
alexzhangs merged commit 6644b9a into develop Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant