aws-batch: Malformed Instance Type thrown for new InstanceType("optimal") regardless of architecture #31762
Labels
@aws-cdk/aws-batch
Related to AWS Batch
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
p2
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
We use
new InstanceType("optimal")
in our platform for batch resources. In the past, this has "just worked." Now we are getting an error,Resolution error: Malformed instance type identifier
. I expect this to "just work".it looks like this commit broke us in 2.161.1. If I understand what is happening, a check was added to block
optimal
use (or at least warn against its use) onARM64
instances, but it looks like the architecture check is breaking becauseoptimal
is not yet resolved into a valid architecture.Regression Issue
Last Known Working CDK Version
2.160.0
Expected Behavior
I am able to use
new InstanceType("optimal")
onx86-64
architecture.Current Behavior
new InstanceType("optimal") throws
Resolution error: Malformed instance type identifier` on all architectures.Reproduction Steps
let instanceType = new InstanceType("optimal");
Possible Solution
"optimal" needs to resolve into the target instance types before doing the architecture check. Longer term, "optimal" should be deprecated/removed or expanded to ARM64 archs.
Additional Information/Context
No response
CDK CLI Version
2.161.1 (build 0a606c9)
Framework Version
No response
Node.js Version
v18.20.4
OS
Linux 5.10 x86_64
Language
TypeScript
Language Version
TypeScript ~4.7.4
Other information
No response
The text was updated successfully, but these errors were encountered: