Can't use ec2.py to pull AWS inventory from US East (GovCloud)

Latest response

I noticed when trying to add an Amazon EC2 inventory source, US East (GovCloud) does not appear as an option (as I believe it is using legacy boto on the backend).

Can you provide someone who can give me a quick summary of how to upgrade ec2.py to use boto3 or somehow force it to call to us-gov-east-1?

I am running Ansible Tower 3.6.2 on CentOS.

inventory settings screen

Responses

Okay, my team found the fix. Add a line for us-gov-east-1 in the following file:: /var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/settings/defaults.py

Add lines for or replace us-gov-west-1 with us-gov-east-1 in the following file: /var/lib/awx/venv/awx/lib64/python3.6/site-packages/boto/endpoints.json

Is there a way to do this without ansible Tower and just using ansible 2.9.5?

I have the same question as Will: Is there a workaround for a none ansible tower deployment?

If ansible uses boto you should be able to find those similar files and attempt a similar fix!