Skip to content

aws-cdk-lib/aws-ec2: "Malformed instance type identifier" when creating ec2 instance of type 'm7i-flex.large' #27587

@matt-m-mclaughlin

Description

@matt-m-mclaughlin

Describe the bug

I'm trying to add an m7i-flex.large instance to a managed node group per
createManagedComputeNodes( name, subnet, [ new ec2.InstanceType('m7i-flex.large'), ], eks.CapacityType.SPOT, );

But receive a Malformed instance type identifier when doing so.

Expected Behavior

I'm able to add the m7i-flex.large instance type as an instance choice for the managed node group

Current Behavior

Error: Malformed instance type identifier
    at InstanceType.sameInstanceClassAs (/node_modules/aws-cdk-lib/aws-ec2/lib/instance-types.js:1:17751)
    at /node_modules/aws-cdk-lib/aws-eks/lib/managed-nodegroup.js:1:7443
    at Array.some (<anonymous>)
    at isGpuInstanceType (/node_modules/aws-cdk-lib/aws-eks/lib/managed-nodegroup.js:1:7422)
    at typeToArch (/node_modules/aws-cdk-lib/aws-eks/lib/managed-nodegroup.js:1:8182)
    at Array.map (<anonymous>)
    at getPossibleAmiTypes (/node_modules/aws-cdk-lib/aws-eks/lib/managed-nodegroup.js:1:8442)
    at new Nodegroup (/node_modules/aws-cdk-lib/aws-eks/lib/managed-nodegroup.js:1:3543)
    at Cluster.addNodegroupCapacity (/node_modules/aws-cdk-lib/aws-eks/lib/cluster.js:1:19557)

Node.js v20.5.0

Reproduction Steps

Add a m7i-flex.large instance type to a managed node group per "Describe the bug". Then run cdk synthesize.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.101.1 (build 16ddad1)

Framework Version

No response

Node.js Version

20.5.0

OS

MAC OS Monterey 12.6.1

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudbugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions