Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use S3 dualstack endpoint by default #175

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

hnousiainen
Copy link
Contributor

When using the default S3 endpoints, request using dualstack IPv4/IPv6 endpoints.

About this change - What it does

Configure botocore to utilize dualstack IPv4/IPv6 endpoint for S3. This enables IPv6 only clients to use S3 through rohmu as well.

@@ -137,6 +137,7 @@ def __init__(
if proxy_info:
proxy_url = get_proxy_url(proxy_info)
custom_config["proxies"] = {"https": proxy_url}
custom_config["use_dualstack_endpoint"] = True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be provided as a parameter so that calling code is able to control the value in case this ends up causing some problems?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a configuration option to turn this off, but I'd personally prefer keeping it enabled by default: IPv6 is nowdays well supported, if available and configured.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That actually reminds me, was this validated against non-AWS implementations of S3? I at least have no idea what's the state of IPv6 with those.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config only applies to default botocore addresses, and is not used if one passes explicit host/port information.

When using the default S3 endpoints, request using dualstack
IPv4/IPv6 endpoints by default. This behavior can be disabled by
configuring S3 with use_dualstack_endpoints as false.
@hnousiainen hnousiainen force-pushed the htn_s3_dualstack_endpoints branch from dc1304c to 451b588 Compare March 26, 2024 11:59
@hnousiainen hnousiainen changed the title Use S3 dualstack endpoint Use S3 dualstack endpoint by default Mar 26, 2024
@rikonen rikonen merged commit 04c1b3f into Aiven-Open:main Mar 26, 2024
8 checks passed
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.

2 participants