fixes #12831 by updating the boto iam connection method to connect_to_region
This commit is contained in:
parent
14f32de7a6
commit
2b2285eb67
3 changed files with 4 additions and 3 deletions
|
@ -565,7 +565,7 @@ def main():
|
||||||
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)
|
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
iam = boto.iam.connection.IAMConnection(**aws_connect_kwargs)
|
iam = boto.iam.connect_to_region(region, **aws_connect_kwargs)
|
||||||
except boto.exception.NoAuthHandlerFound, e:
|
except boto.exception.NoAuthHandlerFound, e:
|
||||||
module.fail_json(msg=str(e))
|
module.fail_json(msg=str(e))
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ import sys
|
||||||
try:
|
try:
|
||||||
import boto
|
import boto
|
||||||
import boto.iam
|
import boto.iam
|
||||||
|
import boto.ec2
|
||||||
HAS_BOTO = True
|
HAS_BOTO = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
HAS_BOTO = False
|
HAS_BOTO = False
|
||||||
|
@ -246,7 +247,7 @@ def main():
|
||||||
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)
|
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
iam = boto.iam.connection.IAMConnection(**aws_connect_kwargs)
|
iam = boto.iam.connect_to_region(region, **aws_connect_kwargs)
|
||||||
except boto.exception.NoAuthHandlerFound, e:
|
except boto.exception.NoAuthHandlerFound, e:
|
||||||
module.fail_json(msg=str(e))
|
module.fail_json(msg=str(e))
|
||||||
|
|
||||||
|
|
|
@ -307,7 +307,7 @@ def main():
|
||||||
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)
|
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
iam = boto.iam.connection.IAMConnection(**aws_connect_kwargs)
|
iam = boto.iam.connect_to_region(region, **aws_connect_kwargs)
|
||||||
except boto.exception.NoAuthHandlerFound, e:
|
except boto.exception.NoAuthHandlerFound, e:
|
||||||
module.fail_json(msg=str(e))
|
module.fail_json(msg=str(e))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue