Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_cdk.aws_ec2.InstanceClass: Support MAC2 #23854

Closed
2 tasks
samuel40791765 opened this issue Jan 26, 2023 · 5 comments · Fixed by #29427
Closed
2 tasks

aws_cdk.aws_ec2.InstanceClass: Support MAC2 #23854

samuel40791765 opened this issue Jan 26, 2023 · 5 comments · Fixed by #29427
Assignees
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@samuel40791765
Copy link

Describe the feature

I would like support for spinning up Mac ec2 Instances with ARM processors (M1).

Use Case

Add it to the instance class definitions.

Proposed Solution

Add MAC2(?) to the instance class definitions.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

1.97.0 (looking to upgrade soon)

Environment details (OS name and version, etc.)

Ubuntu 20.04

@samuel40791765 samuel40791765 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 26, 2023
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Jan 26, 2023
@pahud
Copy link
Contributor

pahud commented Jan 30, 2023

Thank you.

We need to first explore if the instance type has been supported in cloudformation. Are you interested to submit a PR for this?

Adding the announcement URL here for reference:
https://aws.amazon.com/about-aws/whats-new/2022/07/general-availability-amazon-ec2-m1-mac-instances-macos/

@pahud pahud added effort/medium Medium work item – several days of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jan 30, 2023
@pahud pahud self-assigned this Jan 30, 2023
@samuel40791765
Copy link
Author

Just a minor update, I got my cdk script working by using CfnInstance instead. That should help indicate that cloudformation supports the new instance type?
I'm quite unfamiliar with this codebase, so it would take me a while to figure things out. But new support for this shouldn't be too hard-pressing :).

@markshep-wbg
Copy link

The documentation for AWS::EC2::LaunchTemplate LaunchTemplateData now lists mac2-m2pro.metal and mac2.metal among the allowed values for InstanceType.

I don't know how long mac2.metal has been supported, but I guess this announcement from yesterday relates to the mac2-m2pro.metal instance type:

https://aws.amazon.com/about-aws/whats-new/2023/10/general-availability-amazon-ec2-m2-mac-instances-mac-os/

So does that mean it's possible to implement this feature request now?

@mergify mergify bot closed this as completed in #29427 Mar 11, 2024
mergify bot pushed a commit that referenced this issue Mar 11, 2024
### Issue # (if applicable)

Closes #23854

### Reason for this change

Update the CDK EC2 instance class and size enums to match the current availability

### Description of changes

Added the missing instance class and sizes

### Description of how you validated changes

This was generated with the help of the same tool I used to create #29422, using the live SDK data to match against the CDK. For the instance types, I am using the `DescribeInstanceTypes` API command in multiple regions (`us-east-1`, `us-east-2`, `us-west-1`, `eu-west-1`.) As far as I could tell, the union of `us-east-1` and `us-east-2` cover all possible instance classes and sizes, but correct me if I'm wrong.

As a sanity check, I'm also checking that the CDK does not have more instance types and sizes that the SDK does. It does vary between regions, but of note, there were:
* `p4de`, in developer preview
* `x2g`, RDS exclusive and not returned by `DescribeInstanceTypes`

Finally, I am ignoring some of the previous generation instance classes missing from the CDK, as they are very outdated and weren't added in first place, i.e. `c1`, `t1`, `m1`, `m2`, and `i2`.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

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

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@thyming
Copy link

thyming commented Apr 2, 2024

I think this needs to be reopened; I tried using the new instance types but they don't seem to match this regex:

const instanceTypeComponents = this.instanceTypeIdentifier.match(/^([a-z]+)(\d{1,2})([a-z\-]*)\.([a-z0-9\-]+)$/);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants