# ec2\_group does not honor region or ec2\_url parameter

**URL:** <https://forum.ansible.com/t/ec2-group-does-not-honor-region-or-ec2-url-parameter/18732>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [July 11, 2015, 4:20am UTC](https://forum.ansible.com/t/ec2-group-does-not-honor-region-or-ec2-url-parameter/18732 "2015-07-11T04:20:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Truong](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Steven\_Truong](https://forum.ansible.com/u/Steven_Truong)\
**Post date:** [July 11, 2015, 4:20am UTC](https://forum.ansible.com/t/ec2-group-does-not-honor-region-or-ec2-url-parameter/18732/1 "2015-07-11T04:20:40Z")

</div>

Hi all,

I am using Ansible 1.9.2 and when I was in /usr/local/lib/python2.7/dist-packages/ansible/modules/core/cloud/amazon and grep for region or ec2\_url I did not see any real mention of either these in the codes.

grep ‘ec2\_url|region’ ec2\_group.py  
region:

- the EC2 region to use  
region: eu-west-1a

These are there but parts of the documentation.

ec2\_group description=‘Allow hadoop access from outside of AWS’ vpc\_id=vpc-xxxxxx region=us-gov-west-1 name=ext-hadoop-gov aws\_access\_key=xxx aws\_secret\_key=xxxx

or

ec2\_group description=‘Allow hadoop access from outside of AWS’ vpc\_id=vpc-xxxxxxx ec2\_url=[https://ec2.us-gov-west-1.amazonaws.com](https://ec2.us-gov-west-1.amazonaws.com) name=ext-hadoop-gov aws\_access\_key=xxx aws\_secret\_key=xxx

I ran into a problem where I am trying to use ec2\_group to manage security groups in gov cloud us-gov-west-1 region and does not matter whether I specified region or/and ec2\_url nothing seems to work.  
I used the same role to manage security groups in us-east-1 and us-west-2 and things worked without any issue.

Reading the man page gave me the impression that you can use either these. Has anybody gotten this to work with us-gov-west-1 region?

Thank you very much,  
Steven.
