Skip to content

GH-46214: [C++] Improve S3 client initialization #46723

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Jun 5, 2025

Rationale for this change

The default constructor of the ClientConfiguration class in the AWS SDK can issue spurious EC2 metadata requests to resolve the current region, even if we would later set the region from our S3 options.

What changes are included in this PR?

  1. Avoid spurious EC2 metadata calls by disabling "IMDS" in the ClientConfiguration constructor
  2. Change the smart defaults from "legacy" to "standard" (see https://docs.aws.amazon.com/sdkref/latest/guide/feature-smart-config-defaults.html)
  3. Let the user configure the smart defaults in S3Options

Are these changes tested?

By existing CI tests and configurations.

Are there any user-facing changes?

The default S3 settings are potentially changed. Hopefully this will not trigger any regression in behavior.

@pitrou
Copy link
Member Author

pitrou commented Jun 5, 2025

cc @apmorton

@pitrou pitrou force-pushed the gh46214-s3-client-config branch from d90e175 to cbf8592 Compare June 9, 2025 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant