Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why might AWS Elastic Beanstalk continue serving an old app version?

I have developed an app on Django and configured to deploy it on AWS Elastic Beanstalk. An earlier version of the app had admin enabled. I have disabled the same in the new app.

Here is the url.py of the app.

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')),
)

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.

The URL of Elastic Beanstalk env is: http://secondapp-env.elasticbeanstalk.com/

The admin panel can be accessed here: http://secondapp-env.elasticbeanstalk.com/admin/ Ideally this url should result in a 404.

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.

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)

like image 416
Siddhant Avatar asked Apr 27 '14 17:04

Siddhant


People also ask

How many application versions does Elastic Beanstalk allow you to store?

Elastic Beanstalk applies an application's lifecycle policy each time you create a new application version, and deletes up to 100 versions each time the lifecycle policy is applied.

How can you remove older versions that are not used by Elastic Beanstalk so that new versions can be created for your applications?

In the navigation pane, find your application's name and choose Application versions. Select one or more application versions that you want to delete. Choose Actions, then choose Delete.

How does AWS Elastic Beanstalk distinguish between version releases?

AWS Elastic Beanstalk uses proven AWS features and services, such as Amazon EC2, Amazon RDS, Elastic Load Balancing, Auto Scaling, Amazon S3, and Amazon SNS, to create an environment that runs your application. The current version of AWS Elastic Beanstalk uses the Amazon Linux AMI or the Windows Server 2019.

When you use AWS Elastic Beanstalk console to deploy a new application?

When you use the AWS Elastic Beanstalk console to deploy a new application or an application version, you'll need to upload a source bundle. Your source bundle must meet the following requirements: Consist of a single ZIP file or WAR file (you can include multiple WAR files inside your ZIP file) Not exceed 512 MB.


1 Answers

It's quite possible that you are referencing two different files or structures.

Depending on the API you are using, a lot of them have npm build features into them. It is possible you are editing the "raw" code, not building, and then deploying the same built files. If this is the case, you will need to run your build tool: gulp, webpack or grunt, and then deploy again.

like image 80
Peege151 Avatar answered Nov 15 '22 21:11

Peege151