diff --git a/lib/ansible/modules/cloud/amazon/ec2_placement_group.py b/lib/ansible/modules/cloud/amazon/ec2_placement_group.py index a5a8e7d5a3..2564d5d65a 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_placement_group.py +++ b/lib/ansible/modules/cloud/amazon/ec2_placement_group.py @@ -182,7 +182,7 @@ def main(): connection = boto3_conn(module, resource='ec2', conn_type='client', - region=region, **aws_connect_params) + region=region, endpoint=ec2_url, **aws_connect_params) state = module.params.get("state") diff --git a/lib/ansible/modules/cloud/amazon/ec2_placement_group_facts.py b/lib/ansible/modules/cloud/amazon/ec2_placement_group_facts.py index 00b4d40c0e..1fbad84350 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_placement_group_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_placement_group_facts.py @@ -123,7 +123,7 @@ def main(): connection = boto3_conn(module, resource='ec2', conn_type='client', - region=region, **aws_connect_params) + region=region, endpoint=ec2_url, **aws_connect_params) placement_groups = get_placement_groups_details(connection, module) module.exit_json(changed=False, placement_groups=placement_groups) diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py index a33a98c589..df666a8a55 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_net.py @@ -273,7 +273,7 @@ def main(): changed = False region, ec2_url, aws_connect_params = get_aws_connection_info(module, boto3=True) - connection = boto3_conn(module, conn_type='client', resource='ec2', region=region, **aws_connect_params) + connection = boto3_conn(module, conn_type='client', resource='ec2', region=region, endpoint=ec2_url, **aws_connect_params) if dns_hostnames and not dns_support: module.fail_json(msg='In order to enable DNS Hostnames you must also enable DNS support')