# Confused trying to get ec2 example to work (python version problem?)

**URL:** <https://forum.ansible.com/t/confused-trying-to-get-ec2-example-to-work-python-version-problem/12689>\
**Category:** Ansible Project\
**Tags:** ansible-project, aws\
**Created:** [April 16, 2013, 5:36pm UTC](https://forum.ansible.com/t/confused-trying-to-get-ec2-example-to-work-python-version-problem/12689 "2013-04-16T17:36:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [April 16, 2013, 5:36pm UTC](https://forum.ansible.com/t/confused-trying-to-get-ec2-example-to-work-python-version-problem/12689/1 "2013-04-16T17:36:17Z")

</div>

I would really use the OS python and do not think this is a Python version issue.

See some other references: [https://forums.aws.amazon.com/thread.jspa?threadID=104935](https://forums.aws.amazon.com/thread.jspa?threadID=104935)

---

<div class="post-metadata">

**Author:** ![Lester\_Wade](https://avatars.discourse-cdn.com/v4/letter/l/97f17d/32.png) [@Lester\_Wade](https://forum.ansible.com/u/Lester_Wade)\
**Post date:** [April 16, 2013, 5:45pm UTC](https://forum.ansible.com/t/confused-trying-to-get-ec2-example-to-work-python-version-problem/12689/2 "2013-04-16T17:45:08Z")

</div>

You’re setting the EC2\_URL env variable per that guide and this means the connection method in the module is trying to use [ec2.amazonaws.com](http://ec2.amazonaws.com) as an endpoint. I’m not sure if this works, you can find endpoints here:

[http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2\_region](http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region)

Consider not setting EC2\_URL (if you don’t mind AWS EC2 putting you into the default region or one of its choice) or set it to one of those endpoints for the region you want to work in (and have your existing resources in, such as security groups etc.).

---

<div class="post-metadata">

**Author:** ![Jason\_Frank](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@Jason\_Frank](https://forum.ansible.com/u/Jason_Frank)\
**Post date:** [April 16, 2013, 7:35pm UTC](https://forum.ansible.com/t/confused-trying-to-get-ec2-example-to-work-python-version-problem/12689/3 "2013-04-16T19:35:37Z")

</div>

That’s fixed the SSL problem. I spent too much time on my “fix” (upgrading to python 2.7) when it was really just an outdated endpoint. Thanks for getting me back on track.

---

<div class="post-metadata">

**Author:** ![Jason\_Frank](https://avatars.discourse-cdn.com/v4/letter/j/dfb087/32.png) [@Jason\_Frank](https://forum.ansible.com/u/Jason_Frank)\
**Post date:** [April 16, 2013, 7:35pm UTC](https://forum.ansible.com/t/confused-trying-to-get-ec2-example-to-work-python-version-problem/12689/4 "2013-04-16T19:35:45Z")

</div>

You are right, I went down the rabbit hole of python updates based on a search result. lwade’s reply has got me back on track for the original problem.
