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:
Will Thames 2015-11-06 19:02:00 +10:00 committed by Matt Clay
commit 52accd7d1f
9 changed files with 10 additions and 15 deletions

View file

@ -1387,7 +1387,7 @@ def main():
if region:
try:
vpc = boto.vpc.connect_to_region(region, **aws_connect_kwargs)
vpc = connect_to_aws(boto.vpc, region, **aws_connect_kwargs)
except boto.exception.NoAuthHandlerFound, e:
module.fail_json(msg = str(e))
else: