-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
entry point hangs if authorizer raise Exception #1192
Comments
Hi! did you find the solution? |
Nope |
Same issue here after upgrading to latest version and Authorizer blueprints show that this is allowed to generate a 401 Offline: 8.3.1 |
Hi! I don't think this is fixed for Python and the non-in-process runners issue is a red herring: I've encountered the same issue with serverless-offline 8.8.0 & v9.0.0. My serverless.yml:
and handler.py:
gives the same result, even if I use in-process runners or not. I get the following, whether I use
If I use Docker with
Note that in this case, there is actually a response, rather than a hang, but it's not a 401:
Environment:
|
the docs are not really clear about this and need some updates: the flags @OxonianCambion could you open a new issue if you are still experiencing problems? |
Ah, so this issue is (somewhat) unrelated to #1319 . |
According to https://www.serverless.com/blog/strategies-implementing-user-authentication-serverless-applications#lambda-custom-authorizers I can define a custom handler as an authorizer for my endpoints.
As I'm using python I looked for what the authorizer behavior should be and found at https://github.com/awslabs/aws-apigateway-lambda-authorizer-blueprints/blob/0f7f3d933741a48c08c85feff267793f60b61a60/blueprints/python/api-gateway-authorizer-python.py#L29 that I should define a function that shoud raise Exception if the user is not recognized, or return a policy with the right autorizations otherwise.
But if I have a .yaml with
where I have the handler.py as
I can see that
sls offline
start the endpoint, but the rest call hangs.In the logs I see
Instead I expected a 401 response
Environment
The text was updated successfully, but these errors were encountered: