-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
close websocket connection with error code #3789
Comments
Hi @naomiven thanks for reaching out. I think this request would needed to get routed to the API Gateway Management team, as they own the underlying APIs. (We recommend reaching out through AWS Support if you have a support plan, otherwise we can reach out on your behalf.) As an alternative approach have you looked into using the post_to_connection command? I saw you also created an issue in the Chalice repository for this (aws/chalice#2060) which may be the better place to track this going forward. |
Greetings! It looks like this issue hasn’t been active in longer than five days. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
@tim-finnigan Thank you for your suggestions. I just contacted AWS support and will let you know if they will accept the feature request.
yes right now i am using |
Ok thanks for following up. Since the feature request would need to get implemented by either the API Gateway team and/or the Chalice team, I think we can close this and use the Support ticket/Chalice issue to track the request going forward. But please let us know if you have updates to share that could help others with your same use case. |
Is there any action on this issue? Since browsers do not make HTTP status codes generated in the AWS $connect lambda available to websocket clients, it is really essential for a AWS $connect lambda to be able to close the websocket and supply a websocket status code in the 4000 - 4009 range. |
Describe the feature
in
ApiGatewayManagementApi
client can we have a method that closes a websocket connection with a specified code?similar to this
according to the websocket protocol we should be able to do this -> spec
looks like there is no way to do this currently -> https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/apigatewaymanagementapi/client/close.html
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/apigatewaymanagementapi/delete-connection.html
right now, in API gateway, the connection is always closed with status code 1000 when I close the connection through AWS chalice (which calls boto3 client)
API gateway logs:
Use Case
this will be good for error handling in websocket messages. when an error occurs, we should be able to close a connection and specify the error code, as per the websocket protocol spec.
Proposed Solution
add an argument for
code
andreason
in theclose
anddelete-connection
commandsOther Information
No response
Acknowledgements
SDK version used
1.28.5
Environment details (OS name and version, etc.)
MacOS Monterey 12.5.1
The text was updated successfully, but these errors were encountered: