Description
Part of plan #15. Phase 1 — Runtime & Dependency Upgrade.
What's already done
#3—actions/runnerbumped v2.321.0 → v2.333.1 (bundlesexternals/node24).#4—action.ymlmovedusing: node12→using: node24.#5— outputs written to$GITHUB_OUTPUTinstead of::set-output.#6—DEP0169(url.parse) deprecation filtered viaprocess.emitWarningoverride.#3—verify-distCI guard prevents stale bundles.
What's left
Migrate aws-sdk v2 → AWS SDK v3 (@aws-sdk/client-ec2).
v2 is in maintenance mode (AWS announced end-of-support Nov 2025) and emits DEP0169 even at latest v2.1693. v3 uses WHATWG URL, per-service packages (smaller bundle), and a modern API surface.
Refactor targets:
src/aws.js— replacenew AWS.EC2()withnew EC2Client({region})and command-basedsend(new RunInstancesCommand({...}))pattern.package.json— dropaws-sdk, add@aws-sdk/client-ec2.dist/index.js— rebuild. Bundle will shrink significantly (v3 is per-service).
Note on @vercel/ncc: the pinned ncc 0.25.1 is webpack-4-era and refuses to parse modern-JS transitive deps (private class fields). Any real dependency modernization (aws-sdk v3, @actions/core ≥ 1.10, etc.) requires bumping @vercel/ncc to ^0.38.x at the same time. This is the build-side prerequisite for every other dep upgrade.
Compatibility with consumers
External contract must be preserved:
- Inputs:
mode,github-token,ec2-image-*,ec2-instance-type,subnet-id,security-group-id,eip-allocation-id,iam-role-name,aws-resource-tags— all stay the same. - Outputs:
label,ec2-instance-id— stay the same.
Verify via a dogfood push from terraform-provider-namecheap before merging — rotate the SHA pin in that repo's ci.yml on a throwaway branch and confirm the acceptance test pipeline still lifts an EC2, registers a runner, runs make testacc, and terminates cleanly.
Acceptance criteria
-
aws-sdkremoved frompackage.json;@aws-sdk/client-ec2added. -
src/aws.jsusesEC2Client+ Command pattern. -
@vercel/nccbumped to^0.38.x(webpack 5 — can parse modern syntax). -
dist/index.jsrebuilt cleanly;verify-distCI green. - No action-level deprecation warnings on a fresh run.
- Dogfood test on
terraform-provider-namecheapacctest passes end-to-end.
Activity
feat: migrate aws-sdk v2 to @aws-sdk/client-ec2 v3 (Phase 1) (#17)
kurok commentedon Apr 21, 2026
Landed via #17 on feat/al2023-support tip.