title: Why might AWS Elastic Beanstalk continue serving an old app version?
body: <p>I have developed an app on Django and configured to deploy it on <a href="https://aws.amazon.com/elasticbeanstalk/">AWS Elastic Beanstalk</a>. An earlier version of the app had admin enabled. I have disabled the same in the new app.</p>
  
  <p>Here is the url.py of the app.</p>
  
  <pre><code>from django.conf.urls import patterns, include, url
  #from django.contrib import admin
  #from django.contrib import admin.site.urls
  #admin.autodiscover()
  urlpatterns = patterns('',
      # Examples:
      url(r'^$', 'firstapp.views.home', name='home'),
      url(r'^jd/', include('jd.urls')),
     # url(r'^admin/', include('admin.site.urls')),
  )
  </code></pre>
  
  <p>But when I browse the app's URL the app served is still the older version. I ssh-ed into the server and have checked the files. The files are those of the older app. The AWS EB console shows the new app version as deployed to environment. I also downloaded the code from AWS EB panel and the code belongs to the new app. </p>
  
  <p>The URL of Elastic Beanstalk env is:
  <a href="http://secondapp-env.elasticbeanstalk.com/">http://secondapp-env.elasticbeanstalk.com/</a></p>
  
  <p>The admin panel can be accessed here:
  <a href="http://secondapp-env.elasticbeanstalk.com/admin/">http://secondapp-env.elasticbeanstalk.com/admin/</a>
  Ideally this url should result in a 404. </p>
  
  <p>The problem is that in the entire AWS EB console I see the new version of app as deployed and serving (I have tried both by pushing code using git aws.push as well as uploading on the aws eb console) however the actual code residing on ec2 server is still the one the older version of app.</p>
  
  <blockquote>
    <p>How can I force upload the code? Is there a delay in actual deployment
    of code (Although it has been over an hour since I deployed the new
    version and the code is quite small)</p>
  </blockquote>