From 3700a6b6fa672fbae96f6c5f8ae24db4f731a5a9 Mon Sep 17 00:00:00 2001 From: Jackson Price <59149601+jprice8@users.noreply.github.com> Date: Mon, 9 Nov 2026 11:13:00 -0600 Subject: [PATCH] fix(ec2): offer i4i.large in the instance type catalog (#7824) --- docs/services/ec2.md | 17 ++++- .../resources/ec2/instance-type-catalog.yaml | 16 +++++ .../ec2/Ec2I4iCatalogIntegrationTest.java | 65 +++++++++++++++++++ .../ec2/Ec2InstanceTypeCatalogTest.java | 16 +++++ .../resources/ec2/processor-manufacturers.csv | 1 + 5 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 src/test/java/io/floci/aws/services/ec2/Ec2I4iCatalogIntegrationTest.java diff --git a/docs/services/ec2.md b/docs/services/ec2.md index 087f478918..20b4e00e36 100644 --- a/docs/services/ec2.md +++ b/docs/services/ec2.md @@ -33,12 +33,23 @@ EBS-only storage, and one network card supporting 3 interfaces and 10 IPv4 addre interface, following the [AWS R5 specifications](https://docs.aws.amazon.com/ec2/latest/instancetypes/mo.html). `DescribeInstanceTypes` and `DescribeInstanceTypeOfferings` use this same entry. +The catalog also includes `i4i.large`: 2 vCPUs, 16 GiB of memory, Intel x86_64 +processors, 468 GB of local NVMe SSD storage, and one network card supporting +3 interfaces and 10 IPv4 addresses per interface, following the +[AWS storage optimized specifications](https://docs.aws.amazon.com/ec2/latest/instancetypes/so.html). +Both describe APIs and the existing container resource limits use this entry. + ### Processor manufacturer metadata `DescribeInstanceTypes` includes `ProcessorInfo.Manufacturer` for the bundled -instance types. The values were captured from AWS in `us-east-1` on 2026-11-04: -`AWS` for Graviton, `Intel` for the catalog's T2, T3, M5 and R5 types, and `AMD` -for `t3a.nano`. The catalog stores these values explicitly; architecture alone +instance types. For Graviton, T2, T3, M5, R5 and `t3a.nano`, the values were +captured from AWS in `us-east-1` on 2026-11-04: `AWS` for Graviton, `Intel` for +T2, T3, M5 and R5, and `AMD` for `t3a.nano`. + +The `i4i.large` value, `Intel`, comes from the AWS storage optimized specifications +linked above. It was not part of that API capture. + +The catalog stores these values explicitly; architecture alone cannot distinguish Intel from AMD. See the AWS [ProcessorInfo API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ProcessorInfo.html). diff --git a/src/main/resources/ec2/instance-type-catalog.yaml b/src/main/resources/ec2/instance-type-catalog.yaml index e7ba59861b..fdcd53eb6e 100644 --- a/src/main/resources/ec2/instance-type-catalog.yaml +++ b/src/main/resources/ec2/instance-type-catalog.yaml @@ -199,6 +199,22 @@ instanceTypes: - networkCardIndex: 0 maximumNetworkInterfaces: 3 + # Storage optimized: one 468 GB AWS Nitro SSD. + - instanceType: i4i.large + processorManufacturer: Intel + vcpu: 2 + memoryMib: 16384 + localStorageGiB: 468 + supportedArchitectures: + - x86_64 + currentGeneration: true + encryptionInTransitSupported: true + defaultNetworkCardIndex: 0 + ipv4AddressesPerInterface: 10 + networkCards: + - networkCardIndex: 0 + maximumNetworkInterfaces: 3 + - instanceType: t4g.micro processorManufacturer: AWS vcpu: 2 diff --git a/src/test/java/io/floci/aws/services/ec2/Ec2I4iCatalogIntegrationTest.java b/src/test/java/io/floci/aws/services/ec2/Ec2I4iCatalogIntegrationTest.java new file mode 100644 index 0000000000..f8f4c304b7 --- /dev/null +++ b/src/test/java/io/floci/aws/services/ec2/Ec2I4iCatalogIntegrationTest.java @@ -0,0 +1,65 @@ +package io.floci.aws.services.ec2; + +import io.floci.aws.testing.AwsTestClients; +import io.quarkus.test.junit.QuarkusTest; +import org.junit.jupiter.api.Test; +import software.amazon.awssdk.regions.Region; +import software.amazon.awssdk.services.ec2.Ec2Client; +import software.amazon.awssdk.services.ec2.model.InstanceType; +import software.amazon.awssdk.services.ec2.model.InstanceTypeInfo; +import software.amazon.awssdk.services.ec2.model.InstanceTypeOffering; +import software.amazon.awssdk.services.ec2.model.LocationType; +import software.amazon.awssdk.services.ec2.model.NetworkCardInfo; + +import java.util.List; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.hasSize; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +@QuarkusTest +class Ec2I4iCatalogIntegrationTest { + + @Test + void i4iLargeMetadataAndAvailabilityZoneOfferingsAgree() { + try (Ec2Client ec2 = AwsTestClients.create(Ec2Client.builder(), "test", Region.US_EAST_1)) { + List types = ec2.describeInstanceTypes(r -> r.instanceTypes(InstanceType.I4_I_LARGE)) + .instanceTypes(); + assertThat(types, hasSize(1)); + InstanceTypeInfo type = types.getFirst(); + assertEquals(InstanceType.I4_I_LARGE, type.instanceType()); + assertEquals(2, type.vCpuInfo().defaultVCpus()); + assertEquals(16384L, type.memoryInfo().sizeInMiB()); + assertEquals("Intel", type.processorInfo().manufacturer()); + assertThat(type.processorInfo().supportedArchitecturesAsStrings(), contains("x86_64")); + assertTrue(type.instanceStorageSupported()); + assertEquals(468L, type.instanceStorageInfo().totalSizeInGB()); + assertFalse(type.burstablePerformanceSupported()); + assertThat(type.supportedUsageClassesAsStrings(), containsInAnyOrder("on-demand", "spot")); + assertTrue(type.networkInfo().encryptionInTransitSupported()); + assertEquals(0, type.networkInfo().defaultNetworkCardIndex()); + assertEquals(10, type.networkInfo().ipv4AddressesPerInterface()); + assertThat(type.networkInfo().networkCards(), hasSize(1)); + NetworkCardInfo card = type.networkInfo().networkCards().getFirst(); + assertEquals(0, card.networkCardIndex()); + assertEquals(3, card.maximumNetworkInterfaces()); + + String zone = ec2.describeAvailabilityZones().availabilityZones().getFirst().zoneName(); + List offerings = ec2.describeInstanceTypeOfferings(r -> r + .locationType(LocationType.AVAILABILITY_ZONE) + .filters( + f -> f.name("instance-type").values("i4i.large"), + f -> f.name("location").values(zone))) + .instanceTypeOfferings(); + assertThat(offerings, hasSize(1)); + InstanceTypeOffering offering = offerings.getFirst(); + assertEquals(InstanceType.I4_I_LARGE, offering.instanceType()); + assertEquals(LocationType.AVAILABILITY_ZONE, offering.locationType()); + assertEquals(zone, offering.location()); + } + } +} diff --git a/src/test/java/io/floci/aws/services/ec2/Ec2InstanceTypeCatalogTest.java b/src/test/java/io/floci/aws/services/ec2/Ec2InstanceTypeCatalogTest.java index 9a0b8536e8..b1e844f3dd 100644 --- a/src/test/java/io/floci/aws/services/ec2/Ec2InstanceTypeCatalogTest.java +++ b/src/test/java/io/floci/aws/services/ec2/Ec2InstanceTypeCatalogTest.java @@ -43,6 +43,7 @@ class Ec2InstanceTypeCatalogTest { "t3a.nano", "m5.large", "r5.large", + "i4i.large", "t4g.micro", "t4g.small", "t4g.medium", @@ -63,6 +64,21 @@ class Ec2InstanceTypeCatalogTest { assertEquals(expected, instanceTypes); } + @Test + void storageOptimizedI4iLargeHasItsDocumentedCapacity() { + Ec2InstanceTypeCatalog.CatalogInstanceType i4iLarge = instanceTypeCatalog.find("i4i.large").orElseThrow(); + assertEquals(2, i4iLarge.vcpu); + assertEquals(16384, i4iLarge.memoryMib); + assertEquals(468, i4iLarge.localStorageGiB); + assertEquals(List.of("x86_64"), i4iLarge.supportedArchitectures); + assertEquals("Intel", i4iLarge.processorManufacturer); + assertTrue(i4iLarge.encryptionInTransitSupported); + assertEquals(10, i4iLarge.ipv4AddressesPerInterface); + assertEquals(3, i4iLarge.networkCards.get(0).maximumNetworkInterfaces); + assertTrue(Boolean.TRUE.equals(i4iLarge.toResponseMap().get("instanceStorageSupported")), + "i4i.large must report instance storage support"); + } + @Test void largeGravitonTypesHaveExactMetadata() { assertLargeGravitonType("m6gd.large"); diff --git a/src/test/resources/ec2/processor-manufacturers.csv b/src/test/resources/ec2/processor-manufacturers.csv index d141a3af81..3a50a51048 100644 --- a/src/test/resources/ec2/processor-manufacturers.csv +++ b/src/test/resources/ec2/processor-manufacturers.csv @@ -35,6 +35,7 @@ c8g.8xlarge,AWS c8g.large,AWS c8g.medium,AWS c8g.xlarge,AWS +i4i.large,Intel m5.large,Intel m6g.12xlarge,AWS m6g.16xlarge,AWS