Deploying a Cherrypy application to AWS Elastic Beanstalk - ERROR Your WSGIPath refers to a file that does not exist.

378 views
Skip to first unread message

EIBUser

unread,
Sep 7, 2018, 2:08:58 AM9/7/18
to cherrypy-users
Re: AWS Elastic Beanstalk and deploying a Cherrypy application...
  While AWS has documentation about deploying Flask and Django, there is none for Cherrypy.
On an eb create myapp the AWS Elastic Beanstalk console produced the error seen below.
Within the documentation for Django 
AWS makes reference to a config file:

option_settings: aws:elasticbeanstalk:container:python: WSGIPath: ebdjango/wsgi.py

during these steps:
  1. Create a new directory, called .ebextensions:

    (eb-virt) ~/ebdjango$ mkdir .ebextensions
  2. Within the .ebextensions directory, add a configuration file named django.config with the following text:

    Example ~/ebdjango/.ebextensions/django.config

    option_settings: aws:elasticbeanstalk:container:python: WSGIPath: ebdjango/wsgi.py

    This setting, WSGIPath, specifies the location of the WSGI script that Elastic Beanstalk uses to start your application.

I'm wondering if there is an analogous concept when configuring Cherrypy for deployment...

Error on AWS Elastic Beanstalk console:

2018-09-05 03:52:19 UTC-0400INFOEnvironment health has transitioned from Pending to Ok. Initialization completed 12 seconds ago and took 2 minutes.
2018-09-05 03:52:08 UTC-0400INFOSuccessfully launched environment: elliots-cherrypy-env
2018-09-05 03:52:08 UTC-0400INFOApplication available at elliots-cherrypy-env.kdwshbrmn3.us-east-1.elasticbeanstalk.com.
2018-09-05 03:51:49 UTC-0400ERRORYour WSGIPath refers to a file that does not exist.
2018-09-05 03:51:40 UTC-0400INFOCreated CloudWatch alarm named: awseb-e-k8r8vmukpq-stack-AWSEBCloudwatchAlarmHigh-DT2GDTNGST7K

Sviatoslav Sydorenko (@webknjaz)

unread,
Sep 8, 2018, 2:51:53 AM9/8/18
to cherrypy-users
Create a module exposing app as per WSGI spec and use it:

# smth like:
application =
cherrypy.tree.mount(Root())

http://docs.cherrypy.org/en/latest/advanced.html?highlight=wsgi#make-your-cherrypy-application-a-wsgi-application

P.S. Feel free to contribute to our docs with an improvement :)

Reply all
Reply to author
Forward
0 new messages