mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 21:31:26 -07:00
Use connect_to_aws where possible
`connect_to_aws` fixes a bug with security tokens in AWS. Modules should use that rather than calling `boto.x.connect_to_region`
This commit is contained in:
parent
be19982313
commit
52accd7d1f
9 changed files with 10 additions and 15 deletions
|
@ -459,7 +459,8 @@ def main():
|
|||
walrus = urlparse.urlparse(s3_url).hostname
|
||||
s3 = boto.connect_walrus(walrus, **aws_connect_kwargs)
|
||||
else:
|
||||
s3 = boto.s3.connect_to_region(location, is_secure=True, **aws_connect_kwargs)
|
||||
aws_connect_args['is_secure'] = True
|
||||
s3 = connect_to_aws(boto.s3, location, **aws_connect_args)
|
||||
# use this as fallback because connect_to_region seems to fail in boto + non 'classic' aws accounts in some cases
|
||||
if s3 is None:
|
||||
s3 = boto.connect_s3(**aws_connect_kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue