diff --git a/book/src/dev/integrations/s3.md b/book/src/dev/integrations/s3.md index 834bdbf825..6eef4a8add 100644 --- a/book/src/dev/integrations/s3.md +++ b/book/src/dev/integrations/s3.md @@ -30,7 +30,7 @@ You can create `~/.aws/credentials` by installing the ## Endpoint -To use S3-compatible storage not provided by AWS, set the `AWS_S3_ENDPOINT` +To use S3-compatible storage not provided by AWS, set the `AWS_ENDPOINT_URL_S3` environment variable to the hostname or URI of the provider. ## Wildcard Support diff --git a/pkg/s3io/s3io.go b/pkg/s3io/s3io.go index f741cd1185..ca04a16622 100644 --- a/pkg/s3io/s3io.go +++ b/pkg/s3io/s3io.go @@ -27,8 +27,8 @@ func NewClient(cfg *aws.Config) *s3.S3 { cfg = &aws.Config{} } // Add ability to override s3 endpoint via env variable (the aws sdk doesn't - // support this). This is mostly for system tests w/ minio. - if endpoint := os.Getenv("AWS_S3_ENDPOINT"); cfg.Endpoint == nil && endpoint != "" { + // support this). This is mostly for system tests. + if endpoint := os.Getenv("AWS_ENDPOINT_URL_S3"); cfg.Endpoint == nil && endpoint != "" { cfg.Endpoint = new(endpoint) cfg.S3ForcePathStyle = new(true) // https://github.com/minio/minio/tree/master/docs/config#domain } diff --git a/testdata/s3.sh b/testdata/s3.sh index 965833cc8f..7c45e5a28b 100644 --- a/testdata/s3.sh +++ b/testdata/s3.sh @@ -29,4 +29,3 @@ EOF export AWS_ENDPOINT_URL_S3=http://localhost:$port export AWS_REGION=does-not-matter -export AWS_S3_ENDPOINT=$AWS_ENDPOINT_URL_S3