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

ARROW-10066: [C++] Make sure default AWS region selection algorithm is used #8249

Closed
wants to merge 3 commits into from

Conversation

pitrou
Copy link
Member

@pitrou pitrou commented Sep 23, 2020

When the user doesn't set an explicit region, the default algorithm from the AWS C++ SDK should be used.
With SDK versions >= 1.8, this involves reading environment variables and potentially querying the local EC2 metadata server.

@pitrou
Copy link
Member Author

pitrou commented Sep 23, 2020

I tested with PR with versions 1.7.164 and 1.8.52 of the AWS SDK.

@@ -1321,6 +1321,8 @@ def test_s3_real_aws():
from pyarrow.fs import S3FileSystem
fs = S3FileSystem(anonymous=True)
assert fs.region == 'us-east-1' # default region

fs = S3FileSystem(anonymous=True, region='us-east-2')
entries = fs.get_file_info(FileSelector('ursa-labs-taxi-data'))
Copy link
Member Author

Choose a reason for hiding this comment

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

@nealrichardson With the SDK 1.8.52, this doesn't work anymore with the default region.

Copy link
Contributor

Choose a reason for hiding this comment

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

But it does with SDK < 1.8? Interesting.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes...

@github-actions
Copy link

Copy link
Contributor

@nealrichardson nealrichardson left a comment

Choose a reason for hiding this comment

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

One question about the kDefault but otherwise LGTM, thanks!

cpp/src/arrow/filesystem/s3fs.cc Outdated Show resolved Hide resolved
…s used

When the user doesn't set an explicit region, the default algorithm from
the AWS C++ SDK should be used.  With SDK versions >= 1.8, this involves
reading environment variables and potentially querying the local EC2 metadata server.
@pitrou pitrou force-pushed the ARROW-10066-aws-region-selection branch from cb54ec1 to 2bacbd5 Compare September 23, 2020 17:43
@pitrou
Copy link
Member Author

pitrou commented Sep 23, 2020

Successful Travis-CI build here: https://travis-ci.org/github/pitrou/arrow/builds/729705592

@pitrou pitrou deleted the ARROW-10066-aws-region-selection branch September 23, 2020 20:18
emkornfield pushed a commit to emkornfield/arrow that referenced this pull request Oct 16, 2020
…s used

When the user doesn't set an explicit region, the default algorithm from the AWS C++ SDK should be used.
With SDK versions >= 1.8, this involves reading environment variables and potentially querying the local EC2 metadata server.

Closes apache#8249 from pitrou/ARROW-10066-aws-region-selection

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
…s used

When the user doesn't set an explicit region, the default algorithm from the AWS C++ SDK should be used.
With SDK versions >= 1.8, this involves reading environment variables and potentially querying the local EC2 metadata server.

Closes apache#8249 from pitrou/ARROW-10066-aws-region-selection

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
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.

None yet

2 participants