Hi,
I am trying to deploy a django graphql api to aws. I have exactly followed this example. In addition I have added the aws endpoint given after deploying to aws in allowed_hosts of the settings.py. Anyway, I always get “{“message”: “Internal server error”}” independent of which view I am trying to access. According to serverless-wsgi the app under custom should be set to “cookbook.wsgi.application”. But do I need to adjust the prefix of wsgi.handler under functions? Here it is “api”, whereas in the official serverless blog post “Build a Python REST API with Serverless, Lambda, and DynamoDB” it is “app”. Both are flask, to what should it be adjusted in this django case?
Currently my serverless.yml looks like this:
service: cookbook
plugins:
- serverless-python-requirements
- serverless-wsgi
custom:
wsgi:
app: cookbook.wsgi.application
packRequirements: false
pythonRequirements:
dockerizePip: non-linux
provider:
name: aws
runtime: python3.6
stage: dev
region: eu-central-1
functions:
app:
handler: wsgi.handler
events:
- http: ANY /
- http: 'ANY {proxy+}'
Cheers