Reputation: 37
I have a simple (no database) website made with Django that i'm trying to deploy on AWS Elastic Beanstalk. I got a WARN error : "Configuration files cannot be extracted from the application version toulouse-psy-emdr-v2. Check that the application version is a valid zip or war file."
I don't find any explanation about it. I followed a tutorial for the .ebextensions file, my zip file is valid. The rest is successful. The application doesn't work and I get a 502 Bad Gateway error.
I found people talking about it, but no clear solution. Does anybody have ever had that error ? What can I do ?
I ckecked my .ebextensions file and the django.config inside. It looks like this :
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: cabinet_psycho.wsgi:application
Upvotes: 1
Views: 194
Reputation: 1
Double-check the ZIP file structure:
manage.py
file is at the root level inside the ZIP file.Verify configuration:
WSGIPath
specified in your .ebextensions/django.config
file is correct.your_project_name.wsgi:application
.your_project_name
matches the name of your Django project directory.If everything seems correct, you can try deploying your ZIP file using a specialized IDE plugins, such as DryPush for JetBrains software. It's really easy to use. If you encounter any difficulties, you can watch the detailed tutorial on the plugin's official page.
Upvotes: 0
Reputation: 610
Try zipping with the command line.
Zipping using mac's desktop archive function allowed me to upload a zip file but Elastic Beanstalk threw errors in the AWS Console ("Configuration files cannot be extracted...") while failing to pass thru the config values.
zip "/path/myapp.zip" -r * .[^.]* --exclude=*.git* --exclude=static/* --exclude=.DS_Store
Related - Has anyone been able to deploy a Django project to elasticbeanstalk by uploading a zip file?.
AWS reference - https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-sourcebundle.html#using-features.deployment.source.commandline
Upvotes: 0