# Playbook failing due to EC2 delays

**URL:** <https://forum.ansible.com/t/playbook-failing-due-to-ec2-delays/16485>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [October 10, 2014, 9:37am UTC](https://forum.ansible.com/t/playbook-failing-due-to-ec2-delays/16485 "2014-10-10T09:37:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Palmieri](https://avatars.discourse-cdn.com/v4/letter/p/85e7bf/32.png) [@Peter\_Palmieri](https://forum.ansible.com/u/Peter_Palmieri)\
**Post date:** [October 10, 2014, 9:37am UTC](https://forum.ansible.com/t/playbook-failing-due-to-ec2-delays/16485/1 "2014-10-10T09:37:34Z")

</div>

I have a simple playbook that:

1 - starts an EC2 instance  
2 - configures it  
3 - creates an AMI from it  
4 - terminates it

Over the last few days, I’ve been seeing the job fail quite frequently on step 4, because it’s taking AWS too long to shut down the instance:

TASK: [destroy all instances] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
failed: **] =\> (item=**) =\> {“failed”: true, “item”: “\*\*\*\*0”}  
msg: wait for instance termination timeout on Fri Oct 10 06:39:56 2014

It seem obvious that this us an EC2 issue, but is there any way to change how long Ansible will wait for an instance to terminate?
