(ec2): Add support for R9g and R9gd (Graviton5) instance types
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 51
Description
### Describe the feature
AWS recently announced general availability of the **R9g** and **R9gd** memory-optimized EC2 instance types, powered by AWS Graviton5 processors:
https://aws.amazon.com/about-aws/whats-new/2026/08/amazon-ec2-r9g-and-r9gd-memory-optimized-instances-are-now-available/
These instances are available in several regions, including EU (Frankfurt) / `eu-central-1`, which is where we intend to use them.
However, the EC2 `InstanceType` enum does not yet recognize these new types. The enum is generated from the EC2 service model (`services/ec2/src/main/resources/codegen-resources/service-2.json`), and as of the latest release (2.54.12) — and on the current `master` branch — that model contains `r8g`/`r8gd` entries but no `r9g`/`r9gd` entries (in fact no `r9` family at all). The highest `r` Graviton generation present is gen-8.
As a result, `software.amazon.awssdk.services.ec2.model.InstanceType.fromValue("r9g.large")` (and the various `r9g`/`r9gd` sizes, including the `r9gd` NVMe-backed variants) resolves to `UNKNOWN_TO_SDK_VERSION` rather than a real enum value. This breaks calls such as `DescribeInstanceTypes` and `DescribeSpotPriceHistory` when those instance types are passed via the strongly-typed `InstanceType` enum.
Could you please update the EC2 service model to include the new R9g and R9gd instance types so they are available through the `InstanceType` enum in an upcoming release? Thank you.
### Use Case
We are rolling out R9g/R9gd (Graviton5) instances for memory-optimized ARM64 compute in `eu-central-1`. Our application uses the EC2 client (`DescribeInstanceTypes`, `DescribeSpotPriceHistory`) with the typed `InstanceType` enum to fetch instance specifications and spot pricing. Without the enum values for these new types, those lookups fail and we cannot retrieve specs/pricing for the new instances.
### Proposed Solution
Update `services/ec2/src/main/resources/codegen-resources/service-2.json` to add the `r9g.*` and `r9gd.*` instance type values to the `InstanceType` enum (matching the sizes available for the family), so they are generated into `software.amazon.awssdk.services.ec2.model.InstanceType` and ship in a subsequent release.
### Other Information
- Announcement: https://aws.amazon.com/about-aws/whats-new/2026/08/amazon-ec2-r9g-and-r9gd-memory-optimized-instances-are-now-available/
- Verified against `aws-sdk-java-v2` `master` and the latest release (2.54.12): no `r9g`/`r9gd` entries in the EC2 model.
- Related prior request for the M9g/M9gd Graviton5 types: #7029.
### Acknowledgements
- [ ] I may be able to implement this feature request
### AWS Java SDK version used
2.48.2 (also verified the model is missing the types on the latest release 2.54.12 and `master`)
### JDK version used
N/A
### Operating System and version
N/A
Contributor guide
Assessment
This issue has not been assessed yet.