# Ansible and AWS

**URL:** <https://forum.ansible.com/t/ansible-and-aws/19570>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [October 21, 2015, 9:37am UTC](https://forum.ansible.com/t/ansible-and-aws/19570 "2015-10-21T09:37:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stefano](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Stefano](https://forum.ansible.com/u/Stefano)\
**Post date:** [October 21, 2015, 9:37am UTC](https://forum.ansible.com/t/ansible-and-aws/19570/1 "2015-10-21T09:37:13Z")

</div>

Hi,  
i’m new to ansible, i have read the book “Ansible Up and running” by L. Hochstein. I’m considering ansible as an alternative to puppet. From the book seems ansible can launch commands from a client to other machines, i would launch an ami istance and provisioning directly from user data, without intervention of any client, i can get the configuration files of ansible from S3 and running to itself?

Thanks

---

<div class="post-metadata">

**Author:** ![viper233](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/viper233/32/2060_2.png) [@viper233](https://forum.ansible.com/u/viper233)\
**Post date:** [October 21, 2015, 5:50pm UTC](https://forum.ansible.com/t/ansible-and-aws/19570/2 "2015-10-21T17:50:49Z")

</div>

Hi Stefano,

it’s possible to use cloud init to install ansible and then download and install ansible playbooks from s3.

e.g.

runcmd:

- yum clean all

- yum install --enablerepo=epel -y gcc python27 python27-devel python27-pip python27-boto libselinux-python aws-cli

- /usr/bin/pip-2.7 install --upgrade pip-2.7

- alternatives --set python /usr/bin/python2.7

- /usr/bin/pip-2.7 install --upgrade ansible

- mkdir /etc/ansible

- aws s3 cp s3://my\_bucket/ansible /etc/ansible/ --recursive

- echo localhost \> /etc/ansible/hosts

- /usr/local/bin/ansible-playbook /etc/ansible/playbook.yml -i /etc/ansible/hosts

Is this what you are wanting to do?
