mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
allow boto profile use with s3
This commit is contained in:
parent
4af3b60167
commit
de85294d2d
1 changed files with 15 additions and 15 deletions
|
@ -323,7 +323,7 @@ def main():
|
||||||
walrus = urlparse.urlparse(s3_url).hostname
|
walrus = urlparse.urlparse(s3_url).hostname
|
||||||
s3 = boto.connect_walrus(walrus, aws_access_key, aws_secret_key)
|
s3 = boto.connect_walrus(walrus, aws_access_key, aws_secret_key)
|
||||||
else:
|
else:
|
||||||
s3 = boto.s3.connect_to_region(location, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key, is_secure=True, calling_format=OrdinaryCallingFormat())
|
s3 = boto.s3.connection.S3Connection(calling_format=OrdinaryCallingFormat(), **aws_connect_kwargs)
|
||||||
# use this as fallback because connect_to_region seems to fail in boto + non 'classic' aws accounts in some cases
|
# use this as fallback because connect_to_region seems to fail in boto + non 'classic' aws accounts in some cases
|
||||||
if s3 is None:
|
if s3 is None:
|
||||||
s3 = boto.connect_s3(aws_access_key, aws_secret_key)
|
s3 = boto.connect_s3(aws_access_key, aws_secret_key)
|
||||||
|
|
Loading…
Reference in a new issue