fix(ec2): list i386 alongside x86_64 for t2 instance types (#5815)

* fix(ec2): list i386 alongside x86_64 for t2 instance types

* fix(ec2): map i386 AMIs to the linux/386 container platform

t2 instance types now accept i386 images, but the resolver only mapped
arm64 and x86_64, so an i386 catalog image started without a platform
and ran as whatever the host defaults to.

* fix(ec2): allow i386 images on t2.medium

AWS lists t2.nano, t2.micro, t2.small and t2.medium as the t2 sizes that
can run 32-bit AMIs; t2.medium was missing i386 so RunInstances refused
an i386 image there.

* test(ec2): share catalog image setup and drop duplicated t2 pin

Extract serviceWithCatalogImage for the catalog image and resolver stubs
used by the arm64 and i386 runInstances tests, and stop
i386CatalogImageLaunchesOnTheLinux386Platform at the platform; the t2
sizes stay pinned in Ec2InstanceTypeCatalogTest.t2FamilySupportsI386AndX86_64.
This commit is contained in:
Allen Sanborn authored and GitHub committed 2026-10-16 19:06:17 -04:00
1 parent 050f93e600
commit feafbfe083
5 files changed
+67 -12

No files matched your search

@@ -64,6 +64,7 @@ public class AmiImageResolver {
return switch (architecture) {
case "arm64" -> "linux/arm64";
case "x86_64" -> "linux/amd64";
case "i386" -> "linux/386";
default -> null;
};
}