Skip to content

Conversation

@phuhung273
Copy link
Contributor

@phuhung273 phuhung273 commented Oct 28, 2025

Issue # (if applicable)

Close #35859

Reason for this change

  • Keep codebase clean
  • Prevent the case when adding a new feature to ECS but forgot to do the same for EKS
  • Streamline future change, eg: (aws-batch): AWS Batch Compute Environment For AL2023 #35839
  • A foundation to also reduce duplication for defaultInstanceClasses, useOptimalInstanceClasses, allocationStrategy, spotBidPercentage, instanceRole, launchTemplate, minvCpus, placementGroup and their related functions. I don't want to submit a huge refactor PR directly.

Description of changes

Init base EC2 class for ECS and EKS, start with only minimal things:

  • property instanceTypes
  • property instanceClasses
  • method addInstanceType
  • method addInstanceClass

Description of how you validated changes

Unit + Integ

Checklist


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

@aws-cdk-automation aws-cdk-automation requested a review from a team October 28, 2025 04:34
@github-actions github-actions bot added p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Oct 28, 2025
@phuhung273 phuhung273 mentioned this pull request Oct 28, 2025
1 task
@github-actions github-actions bot added effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. labels Oct 30, 2025
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

batch: duplicate code in ManagedEc2EcsComputeEnvironment and ManagedEc2EksComputeEnvironment

2 participants