Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-python-flask-api - Internal Server Error #716

Open
romankurnovskii opened this issue Sep 2, 2022 · 0 comments
Open

aws-python-flask-api - Internal Server Error #716

romankurnovskii opened this issue Sep 2, 2022 · 0 comments

Comments

@romankurnovskii
Copy link

aws-python-flask-api example works locally correct but after deploy getting {"message":"Internal Server Error"}

How to reproduce:

npm install
pip install -r requirements.txt
serverless deploy

log:

Using default Python executable: python
Packaging Python WSGI handler...

✔ Service deployed to stack aws-python-flask-api-project-dev (92s)

dashboard: https://app.serverless.com/xxxx/apps/aws-flask-api/aws-python-flask-api-project/
endpoint: ANY - https://xxxx.execute-api.eu-west-1.amazonaws.com
functions:
  api: aws-python-flask-api-project-dev-api (11 MB)

cloudwatch:

2022-09-02T04:37:10.629Z	835dece5-1e3a-50f9-5811-e0c60977e8b1	ERROR	Invoke Error 	{
    "errorType": "Error",
    "errorMessage": "Cannot find module './wsgi_handler.js'\nRequire stack:\n- /var/task/s_api.js\n- /var/runtime/UserFunction.js\n- /var/runtime/Runtime.js\n- /var/runtime/index.js",
    "code": "MODULE_NOT_FOUND",
    "requireStack": [
        "/var/task/s_api.js",
        "/var/runtime/UserFunction.js",
        "/var/runtime/Runtime.js",
        "/var/runtime/index.js"
    ],
    "stack": [
        "Error: Cannot find module './wsgi_handler.js'",
        "Require stack:",
        "- /var/task/s_api.js",
        "- /var/runtime/UserFunction.js",
        "- /var/runtime/Runtime.js",
        "- /var/runtime/index.js",
        "    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)",
        "    at Module._require.i.require (/var/task/serverless_sdk/index.js:9:73131)",
        "    at require (internal/modules/cjs/helpers.js:101:18)",
        "    at Object.<anonymous> (/var/task/s_api.js:25:23)",
        "    at Module._compile (internal/modules/cjs/loader.js:1085:14)",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)",
        "    at Module.load (internal/modules/cjs/loader.js:950:32)",
        "    at Function.Module._load (internal/modules/cjs/loader.js:790:12)",
        "    at Module.require (internal/modules/cjs/loader.js:974:19)",
        "    at require (internal/modules/cjs/helpers.js:101:18)"
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant