Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tensorflow_io/core/filesystems/s3/s3_filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ static Aws::Client::ClientConfiguration& GetDefaultClientConfig() {
absl::MutexLock l(&cfg_lock);

if (!init) {
const char* verify_ssl = getenv("S3_VERIFY_SSL");
if (verify_ssl) {
if (verify_ssl[0] == '0')
cfg.verifySSL = false;
else
cfg.verifySSL = true;
}
// if these timeouts are low, you may see an error when
// uploading/downloading large files: Unable to connect to endpoint
int64_t timeout;
Expand Down
1 change: 1 addition & 0 deletions tests/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def test_read_file():
response = client.get_object(Bucket=bucket_name, Key=key_name)
assert response["Body"].read() == body

os.environ["S3_VERIFY_SSL"] = "0"
os.environ["S3_ENDPOINT"] = "http://localhost:4566"

content = tf.io.read_file(f"s3://{bucket_name}/{key_name}")
Expand Down