# Ansible AWS EC2 create scripts gives this error:: "Timeout when waiting for 172.31.25.6:22"}

**URL:** <https://forum.ansible.com/t/ansible-aws-ec2-create-scripts-gives-this-error-timeout-when-waiting-for-172-31-25-6-22/26271>\
**Category:** Ansible Developer\
**Tags:** aws\
**Created:** [December 12, 2017, 11:53pm UTC](https://forum.ansible.com/t/ansible-aws-ec2-create-scripts-gives-this-error-timeout-when-waiting-for-172-31-25-6-22/26271 "2017-12-12T23:53:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajay\_Sharma1](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@Ajay\_Sharma1](https://forum.ansible.com/u/Ajay_Sharma1)\
**Post date:** [December 12, 2017, 11:53pm UTC](https://forum.ansible.com/t/ansible-aws-ec2-create-scripts-gives-this-error-timeout-when-waiting-for-172-31-25-6-22/26271/1 "2017-12-12T23:53:59Z")

</div>

My Ansible AWS EC2 instance creation script gives this error.

“Timeout when waiting for [172.31.25.6:22](http://172.31.25.6:22/)”}  
to retry, use: --limit @/root/instance/provision-ec2.retry

this code is causing problem, Please let me know, how to solve this.

- name: Wait for the instances to boot by checking the ssh port  
wait\_for: host={{item.private\_ip}} port=22 delay=60 timeout=220 state=started  
with\_items: “{{ ec2.instances }}”
