Commit 9b7b8813 authored by Yong Tang's avatar Yong Tang Committed by Rasmus Munk Larsen
Browse files

Load region from `~/.aws/config` if possible in S3 (#15723)



* Load region from `~/.aws/config` if possible in S3

This fix tries to address the issue raised in comment 15562
where TensorFlow does not load region from `~/.aws/config`
if exists. The reason was that AWS C++ SDK does not use the
config file by default.

This fix adds the loading of config file (`~/.aws/config`)
explicitly, if either AWS_REGION or S3_REGION is not
available. In case none of the
`AWS_REGION`, `S3_REGION`, `~/.aws/config` is available,
then the default `use-east-1` is used (by AWS C++ SDK).

This fix is related to 15562.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Load config from ~/.aws/config if AWS_SDK_LOAD_CONFIG is set

and config file location could be overwritten by AWS_CONFIG_FILE

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Reformat s3_file_system.cc with clang-format

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent 7eb68b86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment