1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Catch failed connection due to a bad region in ec2_scaling_policy

Fixes #7506
This commit is contained in:
James Cammarata 2014-06-05 16:44:55 -05:00
parent e0a4c389f3
commit a760299170

View file

@ -162,6 +162,8 @@ def main():
try:
connection = connect_to_aws(boto.ec2.autoscale, region, **aws_connect_params)
if not connection:
module.fail_json(msg="failed to connect to AWS for the given region: %s" % str(region))
except boto.exception.NoAuthHandlerFound, e:
module.fail_json(msg = str(e))