You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
confirm the app instance is a wsgi instance by serving with gunicorn: gunicorn app:app --bind:0.0.0.0:5000
zappa init (I have an IAM user that is working for other lambda deployments using zappa that I'm using here -- permissions are confirmed to be working as expected)
Set staging: dev
Set profile/IAM user to user with appropriate permissions: zappadeploy
S3 bucket: default recommended
Where is app's function?: app.app
zappa deploy dev
Everything deploys as expected:
(.venv) gonzo:tz gonzo$ zappa deploy dev
Calling deploy for stage dev..
Downloading and installing dependencies..
Packaging project as zip.
Uploading tz-dev-1503759323.zip (7.4MiB)..
100%|██████████████████████████████████████████████████████████████████████████| 7.75M/7.75M [00:01<00:00, 4.85MB/s]
Scheduling..
Scheduled tz-dev-zappa-keep-warm-handler.keep_warm_callback with expression rate(4 minutes)!
Uploading tz-dev-template-1503759338.json (1.5KiB)..
100%|██████████████████████████████████████████████████████████████████████████| 1.58K/1.58K [00:00<00:00, 4.07KB/s]
Waiting for stack tz-dev to create (this can take a bit)..
75%|████████████████████████████████████████████████████████████ | 3/4 [00:09<00:05, 5.04s/res]
Deploying API Gateway..
Deployment complete!: https://79st39r9fe.execute-api.us-east-1.amazonaws.com/dev
Running locally with gunicorn all works as expected
gunicorn app:app --bind=0.0.0.0:8080
(.venv) gonzo:tz gonzo$ http :8080
HTTP/1.1 200 OK
Connection: close
Date: Sat, 26 Aug 2017 15:04:02 GMT
Server: gunicorn/19.7.1
Transfer-Encoding: chunked
content-type: application/json
{
"message": "Welcome to API Star!"
}
Note: I'm using gunicorn to verify that a wsgi app is being used.
When environ['SCRIPT_NAME'] is removed and the path is just PATH_INFO it works fine when deployed to lambda. @tomchristie I am happy to submit a PR to fix this, but maybe I am missing why it has been done this way?
Using current master (v0.2) of Apistar I am unable to duplicate serverless deploy instructions in the readme.
For further context, you can reference a thread on Apistar's discuss forum here.
You can see my project files in this gist.
What I tried
apistart new . --framework wsgi
gunicorn app:app --bind:0.0.0.0:5000
zappa init
(I have an IAM user that is working for other lambda deployments using zappa that I'm using here -- permissions are confirmed to be working as expected)zappa deploy dev
Everything deploys as expected:
Running locally with gunicorn all works as expected
gunicorn app:app --bind=0.0.0.0:8080
Note: I'm using gunicorn to verify that a wsgi app is being used.
Resulting error: 404 not found
The text was updated successfully, but these errors were encountered: