Skip to content

Fix fall back to IPv6 for ec2-instance-connect ssh --connection-type eice#10358

Open
leezu wants to merge 2 commits into
aws:v2from
leezu:fix-eice-ipv6-fallback
Open

Fix fall back to IPv6 for ec2-instance-connect ssh --connection-type eice#10358
leezu wants to merge 2 commits into
aws:v2from
leezu:fix-eice-ipv6-fallback

Conversation

@leezu
Copy link
Copy Markdown

@leezu leezu commented May 28, 2026

When --connection-type eice is set, resolve the destination address as private IPv4 with IPv6 as a fallback, instead of unconditionally using private IPv4. Without this, instances in IPv6-only subnets fail with "Unable to find any IP address on the instance to connect to." even though the EICE itself supports IPv6 destinations.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

When --connection-type eice is set, resolve the destination address as
private IPv4 with IPv6 as a fallback, instead of unconditionally using
private IPv4. Without this, instances in IPv6-only subnets fail with
"Unable to find any IP address on the instance to connect to." even
though the EICE itself supports IPv6 destinations.
@leezu leezu requested a review from a team as a code owner May 28, 2026 21:44
When --instance-id is given without --private-ip-address, resolve the
destination as private IPv4 with IPv6 as a fallback, instead of
KeyError'ing on PrivateIpAddress for instances in IPv6-only subnets.
The EICE accepts either address family.

Also raise a clear ParamValidationError when the instance has no IP
address at all (matching the ssh subcommand's behavior).
@hssyoo hssyoo self-requested a review May 29, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant