Use IAM creds only if endpoint is S3 (#7111)

Requirements like being able to run minio gateway in ec2
pointing to a Minio deployment wouldn't work properly
because IAM creds take precendence on ec2.

Add checks such that we only enable AWS specific features
if our backend URL points to actual AWS S3 not S3 compatible
endpoints.
This commit is contained in:
Harshavardhana
2019-01-24 00:42:33 +05:30
committed by kannappanr
parent ee7dcc2903
commit bd25f31100
2 changed files with 42 additions and 22 deletions

View File

@@ -28,7 +28,7 @@ export MINIO_SECRET_KEY=custom_secret_key
minio gateway s3
```
Minio gateway will automatically look for list of credential styles in following order.
Minio gateway will automatically look for list of credential styles in following order, if your backend URL is AWS S3.
- AWS env vars (i.e. AWS_ACCESS_KEY_ID)
- AWS creds file (i.e. AWS_SHARED_CREDENTIALS_FILE or ~/.aws/credentials)