Skip to content

Comments

chore(autoscaling): fix integ tests - update deprecated AL1/t2/LaunchConfig to AL2/t3/LaunchTemplate#37074

Open
aemada-aws wants to merge 1 commit intomainfrom
fix-integ-aws-autoscaling
Open

chore(autoscaling): fix integ tests - update deprecated AL1/t2/LaunchConfig to AL2/t3/LaunchTemplate#37074
aemada-aws wants to merge 1 commit intomainfrom
fix-integ-aws-autoscaling

Conversation

@aemada-aws
Copy link
Contributor

Issue # (if applicable)

N/A — Integration test remediation

Reason for this change

Three aws-autoscaling integration tests are failing:

  1. integ.asg-lc: "The Launch Configuration creation operation is not available in your account." — The test explicitly set AUTOSCALING_GENERATE_LAUNCH_TEMPLATE=false, forcing deprecated LaunchConfiguration creation which is no longer available.
  2. integ.asg-w-classic-loadbalancer: "The requested configuration is currently not supported. Launching EC2 instance failed." — Uses deprecated Amazon Linux 1 AMI (EOL since 2024-01-01) and t2 instance type.
  3. integ.asg-w-elbv2: Same AL1 + t2 issue as above.

Description of changes

integ.asg-lc.ts:

  • Removed AUTOSCALING_GENERATE_LAUNCH_TEMPLATE=false context override — the last ASG (AsgWithGp3Blockdevice) now generates a LaunchTemplate instead of a deprecated LaunchConfiguration
  • Updated AmazonLinuxImage() (AL1) → AmazonLinuxImage({ generation: AMAZON_LINUX_2 }) for the last ASG
  • Fixed deviceName: 'ebs'deviceName: '/dev/xvdf' — the old name was valid for LaunchConfiguration but not for LaunchTemplate

integ.asg-w-classic-loadbalancer.ts:

  • Updated AmazonLinuxImage()AmazonLinuxImage({ generation: AMAZON_LINUX_2 })
  • Updated BURSTABLE2 (t2.micro) → BURSTABLE3 (t3.micro)

integ.asg-w-elbv2.ts:

  • Updated AmazonLinuxImage()AmazonLinuxImage({ generation: AMAZON_LINUX_2 }) in both stacks
  • Updated BURSTABLE2BURSTABLE3 in ElbV2AsgStack

Destructive changes: integ.asg-lc destroys AsgWithGp3BlockdeviceLaunchConfig24411F5E (LaunchConfiguration) and replaces it with a LaunchTemplate. This is intentional — LaunchConfigurations are deprecated and cannot be created in newer AWS accounts.

Describe any new or updated permissions being added

N/A

Description of how you validated changes

yarn integ test/aws-autoscaling/test/integ.asg-lc.js test/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.js test/aws-autoscaling/test/integ.asg-w-elbv2.js --disable-update-workflow --update-on-failed --force --parallel-regions us-east-1 --parallel-regions us-west-2 --parallel-regions eu-west-1 --verbose

All 3 tests passed across us-east-1, us-west-2, eu-west-1.

Checklist


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

…nfig to AL2/t3/LaunchTemplate

- integ.asg-lc: Remove AUTOSCALING_GENERATE_LAUNCH_TEMPLATE=false (deprecated LC path),
  update AL1→AL2, fix deviceName 'ebs'→'/dev/xvdf' for LT compatibility
- integ.asg-w-classic-loadbalancer: Update AL1→AL2, t2→t3
- integ.asg-w-elbv2: Update AL1→AL2, t2→t3 in both stacks

BREAKING CHANGE: integ.asg-lc destroys LaunchConfiguration resource (replaced by LaunchTemplate)
@aws-cdk-automation aws-cdk-automation requested a review from a team February 24, 2026 18:19
@github-actions github-actions bot added the p2 label Feb 24, 2026
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 24, 2026
@aemada-aws aemada-aws changed the title fix(autoscaling): fix integ tests - update deprecated AL1/t2/LaunchConfig to AL2/t3/LaunchTemplate chore(autoscaling): fix integ tests - update deprecated AL1/t2/LaunchConfig to AL2/t3/LaunchTemplate Feb 24, 2026
@aemada-aws aemada-aws marked this pull request as ready for review February 24, 2026 18:21
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ☑️SkippedFailed ❌️
Security Guardian Results96 ran93 passed3 failed
TestResult
Security Guardian Results
packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.js.snapshot/aws-cdk-asg-integ.template.json
ec2-no-open-security-groups.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-w-elbv2.js.snapshot/aws-cdk-asg-atg-integ.template.json
ec2-no-open-security-groups.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-w-elbv2.js.snapshot/aws-cdk-asg-integ.template.json
ec2-no-open-security-groups.guard❌ failure

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ☑️SkippedFailed ❌️
Security Guardian Results with resolved templates96 ran93 passed3 failed
TestResult
Security Guardian Results with resolved templates
packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-w-classic-loadbalancer.js.snapshot/aws-cdk-asg-integ.template.json
ec2-no-open-security-groups.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-w-elbv2.js.snapshot/aws-cdk-asg-atg-integ.template.json
ec2-no-open-security-groups.guard❌ failure
packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling/test/integ.asg-w-elbv2.js.snapshot/aws-cdk-asg-integ.template.json
ec2-no-open-security-groups.guard❌ failure

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Feb 24, 2026
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 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants