Skip to content

fix(eks): use AL2023 nodegroup in eks-cluster-handlers-vpc integ test - #39558

Draft
matboros wants to merge 1 commit into
aws:mainfrom
matboros:fix-eks-handlers-vpc-al2023
Draft

matboros wants to merge 1 commit into
aws:mainfrom
matboros:fix-eks-handlers-vpc-al2023

Conversation

@matboros

Copy link
Copy Markdown
Contributor

Issue # (if applicable)

No issue to close. This latent failure was surfaced during the EKS 1.37 bump (#39501) via a manual real-cluster deploy; it does not depend on that PR.

Reason for this change

The integ.eks-cluster-handlers-vpc integration test created an eks.Cluster with no capacity override and an unpinned Kubernetes version (...getClusterVersionConfig(this)), so it received the cluster's default-capacity nodegroup on the AL2 (AL2_x86_64) AMI. EKS does not support the AL2 AMI on Kubernetes 1.33+. Once the shared getClusterVersionConfig() default advanced past 1.32, a real deploy of this test began failing:

Resource handler returned message: "AMI Type AL2_x86_64 is only supported for
kubernetes versions 1.32 or earlier" (HandlerErrorCode: InvalidRequest)
  — on AWS::EKS::Nodegroup (the default-capacity nodegroup)

Synth and snapshot checks do not catch this because the failure only occurs at deploy time against the EKS service. eks-cluster-handlers-vpc is the only unpinned EKS integ test that takes the default-capacity nodegroup; every other unpinned test already sets defaultCapacity: 0 and adds an explicit non-AL2 nodegroup.

Description of changes

Mirror the existing passing pattern in integ.eks-cluster-private-endpoint and integ.eks-cluster-imported:

  • Set defaultCapacity: 0 on the cluster (so no implicit AL2 nodegroup is created).
  • Add an explicit addNodegroupCapacity('DefaultCapacity', { minSize: 2, amiType: AL2023_X86_64_STANDARD }), which is supported on 1.33+.

Everything else the test exercises is preserved, notably placeClusterHandlerInVpc: true and its VPC/handler setup (the point of the test). The nodegroup keeps the construct id DefaultCapacity, so the logical ID is unchanged and the snapshot diff is limited to the nodegroup's AmiType (and the now-defaulted InstanceTypes).

Destructive change: this replaces the default-capacity nodegroup (AmiType change requires replacement). This is expected and necessary — the previous AL2 nodegroup cannot deploy on k8s 1.33+.

Describe any new or updated permissions being added

None.

Description of how you validated changes

Deployed the test to a real EKS cluster on us-east-1 with integ-runner --update-on-failed. The stack reached CREATE_COMPLETE and the default-capacity nodegroup came up ACTIVE with amiType: AL2023_x86_64_STANDARD on the latest Kubernetes version — confirming the fix (the previous AL2 nodegroup could not deploy). The stack was then torn down cleanly with no stranded clusters or stacks. The snapshot was updated to reflect the nodegroup change.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The `integ.eks-cluster-handlers-vpc` test created an `eks.Cluster` with no
capacity override and an unpinned Kubernetes version, so it received the
cluster's default-capacity nodegroup on the AL2 (`AL2_x86_64`) AMI. EKS does
not support the AL2 AMI on Kubernetes 1.33+, so once the shared
`getClusterVersionConfig()` default advanced past 1.32, a real deploy of this
test began failing:

  Resource handler returned message: "AMI Type AL2_x86_64 is only supported
  for kubernetes versions 1.32 or earlier" (HandlerErrorCode: InvalidRequest)
  on AWS::EKS::Nodegroup (the default-capacity nodegroup)

Synth and snapshot checks did not catch this because the failure only occurs
at deploy time against the EKS service. It surfaced during the EKS 1.37 bump
(aws#39501) via a manual real-cluster deploy on us-east-1.

Mirror the existing passing pattern in `integ.eks-cluster-private-endpoint`
and `integ.eks-cluster-imported`: set `defaultCapacity: 0` and add an explicit
nodegroup with the AL2023 (`AL2023_X86_64_STANDARD`) AMI, which is supported on
1.33+. Everything else the test exercises (notably `placeClusterHandlerInVpc`)
is preserved.

This change does not depend on aws#39501; it fixes a latent failure on main.
@github-actions github-actions Bot added the p2 label Oct 29, 2026
@mergify mergify Bot added the contribution/core This is a PR that came from AWS. label Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ The following issue reference(s) in your PR description are not valid issues:

Please make sure your PR references an existing issue using the format Closes #123.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.
To suppress a specific rule, see Suppressing Rules.


TestsPassed ✅SkippedFailed
Security Guardian Results23 ran23 passed
TestResult
No test annotations available

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
This security report is NOT a review blocker. Please try merge from main to avoid findings unrelated to the PR.
To suppress a specific rule, see Suppressing Rules.


TestsPassed ✅SkippedFailed
Security Guardian Results with resolved templates23 ran23 passed
TestResult
No test annotations available

This branch had an error being deployed

1 failed deployment
automation — 98fb15bf Deployed Oct 29, 2026 by mergify[bot] via validate-pr #375532
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS. p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant