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:Yong 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:
Yong Tang <yong.tang.github@outlook.com> * Reformat s3_file_system.cc with clang-format Signed-off-by:
Yong Tang <yong.tang.github@outlook.com>
Loading
Please sign in to comment