|
@@ -160,16 +160,14 @@ class Client(object):
|
|
|
|
|
|
|
|
# Attempt to create S3 connection based on configured credentials and host or region first, then fallback to IAM
|
|
# Attempt to create S3 connection based on configured credentials and host or region first, then fallback to IAM
|
|
|
try:
|
|
try:
|
|
|
|
|
+ # Use V4 signature support by default
|
|
|
|
|
+ os.environ['S3_USE_SIGV4'] = 'True'
|
|
|
if self._host is not None:
|
|
if self._host is not None:
|
|
|
- # Use V4 signature support by default
|
|
|
|
|
- os.environ['S3_USE_SIGV4'] = 'True'
|
|
|
|
|
kwargs.update({'host': self._host})
|
|
kwargs.update({'host': self._host})
|
|
|
connection = boto.s3.connection.S3Connection(**kwargs)
|
|
connection = boto.s3.connection.S3Connection(**kwargs)
|
|
|
elif self._region:
|
|
elif self._region:
|
|
|
connection = boto.s3.connect_to_region(self._region,
|
|
connection = boto.s3.connect_to_region(self._region,
|
|
|
- aws_access_key_id=self._access_key_id,
|
|
|
|
|
- aws_secret_access_key=self._secret_access_key,
|
|
|
|
|
- security_token=self._security_token)
|
|
|
|
|
|
|
+ **kwargs)
|
|
|
else:
|
|
else:
|
|
|
kwargs.update({'host': 's3.amazonaws.com'})
|
|
kwargs.update({'host': 's3.amazonaws.com'})
|
|
|
connection = boto.s3.connection.S3Connection(**kwargs)
|
|
connection = boto.s3.connection.S3Connection(**kwargs)
|