-
Notifications
You must be signed in to change notification settings - Fork 420
Bug: APIGatewayAuthorizerResponse cannot be used for Websocket $connect #5800
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Hi @deuscapturus! Thanks for opening this issue. Let me check the code to see what's going on, but based on your investigation, I see that the |
Hi @deuscapturus! We are working on this PR #6058 to add the new class I hope to have this available in the next release, which is expected on 11/02/2025. |
|
This is now released under 3.6.0 version! |
Expected Behaviour
the
allow_route()
andallow_all_routes()
methods inAPIGatewayAuthorizerResponse
do not create a valid policy statement for a Websocket connection. These methods should work with websocket connections or some other Response class should be created for websocket responses.Current Behaviour
Using this class to authorize a websocket connection with allow methods will always result in
403 Unauthorized
Code snippet
Results in resource
['arn:aws:execute-api:us-east-1:1234567891:111aaa222b/prod/*/*']
which doesn't matcharn:aws:execute-api:us-east-1:1234567891:111aaa222b/prod/$connect
and results in a 403 error.Possible Solution
WORKAROUND
Steps to Reproduce
_
Powertools for AWS Lambda (Python) version
3.4.0
AWS Lambda function runtime
3.12
Packaging format used
PyPi
Debugging logs
The text was updated successfully, but these errors were encountered: