title: Failed to deploy application: During an aborted deployment, some instances may have deployed the new application version
body: <p>I can't deploy a new version on Elastic Beanstalk.</p>
  <p>Everything was working fine until I tried to deploy a new version where I have lots of issues (It is not the first time I deploy a new version on this environment, I already have deployed dozens). When I manage to fixe all of them I got those errors:</p>
  <ul>
  <li><code>Failed to deploy application.</code></li>
  <li><code>During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.</code></li>
  <li><code>Unsuccessful command execution on instance id(s) 'i-...'. Aborting the operation</code></li>
  </ul>
  <p>I redeploy the version which does not work.</p>
  <p>Here is the Elastic Beanstalk console:</p>
  <p><a href="https://i.stack.imgur.com/afRgQ.png" rel="nofollow noreferrer">Elastic Beanstalk console</a></p>
  <p><a href="https://i.stack.imgur.com/kIlVc.png" rel="nofollow noreferrer">Elastic Beanstalk events</a></p>
  <p>The request logs button from Elastic Beanstalk return nothing.
  The system log from EC2 instance shows the last working version logs.</p>
  <p>I enable the CloudWatch logs from <code>Configuration</code> navigation pane. It added 4 files to CloudWatch logs:</p>
  <ul>
  <li><code>/var/log/eb-activity.log</code>  -&gt; empty so far</li>
  <li><code>/var/log/httpd/access_log</code> -&gt; empty so far</li>
  <li><code>/var/log/httpd/error_log</code> -&gt; empty so far</li>
  <li><code>/environment-health.log</code> -&gt; <code> Command is executing on all instances (56 minutes or more elapsed).&quot;, &quot;Incorrect application version found on all instances. Expected version \&quot;prod-v1.7.28-0\&quot; (deployment 128).</code></li>
  </ul>
  <p>It is an Amazon Linux, t2.medium instance with Apache as web server</p>
  <p>What I already try:</p>
  <ul>
  <li>Change the name of .zip each time to be different of other zip already deploy</li>
  <li>Terminate the instance and the loadBalancer automatically create a new one</li>
  <li>Reboot the instance</li>
  <li>Rebuild Elastic Beanstalk environment</li>
  <li>Deploy a simplest code</li>
  </ul>
  <p>I tried to deploy just a zip with the code below but I got same errors.</p>
  <pre><code>&lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;This is the title of the webpage!&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;p&gt;This is an example paragraph. Anything in the &lt;strong&gt;body&lt;/strong&gt; tag will appear on the page, just like this &lt;strong&gt;p&lt;/strong&gt; tag and its contents.&lt;/p&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>It always go back to last working version and when I tried to deploy the new version it does not work.</p>
  <p>On some post I see some people telling it is maybe because the instance is too small but before it was working perfectly and the size does not change since then.</p>
  <p>If you have some questions or ideas I will be very thankful.
  Have a nice day !</p>
  <p><strong>Answer:</strong>
  The issue was in the logs like you said. I had to ssh into my EC2 instance to reached them. The error was in the file <code>cfn-init-cmd.log</code>.
  One of the command was waiting for an input so it timed out with no error message.</p>