Force botocore to connect using ipv6 first when using dualstack #3349
Labels
bug
This issue is a confirmed bug.
ec2
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
p2
This is a standard priority issue
Describe the bug
When using an EC2 instance with a private ipv4 network and a public ipv6 network botocore will timeout trying to connect to the ipv4 address if
use_dualstack=True
If there was a way to prefer IPv6 when dualstack is enabled that would be great.
Regression Issue
Expected Behavior
Attempt to connect with IPv6 first with a fallback to IPv4 when
use_dualstack=True
Current Behavior
Program hangs until botocore endpoint connection timeout happens because ipv4 isn't routable
Reproduction Steps
Create ec2 instance with private ipv4 and public ipv6
Attempt to connect to any dualstack AWS service
Possible Solution
Terrible workaround
Run this before calling botocore:
Additional Information/Context
No response
SDK version used
1.36.4
Environment details (OS name and version, etc.)
Linux in EC2 (any distribution, all will have this same problem), Python 3.13
The text was updated successfully, but these errors were encountered: