-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the feature
Support for the new default_x86_64 and default_arm64 instance classes and deprecate the optimal instance class created by the useOptimalInstanceClasses property.
Use Case
I want to be able to select between default_x86_64 and default_arm64 as described in https://aws.amazon.com/blogs/hpc/introducing-default-instance-categories-for-aws-batch/.
We recommend updating your Batch environments to adopt the new categories. However, you are not required to update. Existing AWS Batch compute environments that use optimal remain valid. The CreateComputeEnvironment and UpdateComputeEnvironment API actions continue to accept optimal as a valid value. The behavior of optimal will stay the same until early November 2025. After that, optimal will behave the same as the default_x86_64 instance category.
Proposed Solution
No response
Other Information
There appears to be a regression of logic that warns whenever x86 and arm instance types are mixed.
aws-cdk/packages/aws-cdk-lib/aws-batch/lib/managed-compute-environment.ts
Lines 1162 to 1172 in 7e80cc9
| if (hasArmInstances && hasX86Instances) { | |
| Annotations.of(scope).addWarningV2('@aws-cdk/aws-batch:mixingARMAndx86InstancesNotSupported', 'Cannot mix ARM and x86 instance types or classes, deploying will cause an error'); | |
| } | |
| if (hasArmInstances && useOptimalInstanceClasses) { | |
| Annotations.of(scope).addWarningV2('@aws-cdk/aws-batch:optimalNotSupportedWithARM', '\'optimal\' instance types are not supported with ARM instance types or classes. Deploying will cause an error, please set useOptimalInstanceClasses to false'); | |
| } | |
| if (useOptimalInstanceClasses || (!hasArmInstances && useOptimalInstanceClasses === undefined)) { | |
| instances.push('optimal'); | |
| } |
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS CDK Library version (aws-cdk-lib)
2.208.0
AWS CDK CLI version
2.1024.0
Environment details (OS name and version, etc.)
Debian GNU/Linux 12