AWS API GW always establishes WebSocket connection

Viewed 11

I have AWS API GW in WebSocket mode with HTTP integration(not proxy mode). The problem is that my service can return any response code for the $connect endpoint but API GW always establishes a connection with a client.

enter image description here

But in the documentation I see this:

Until execution of the integration associated with the $connect route is completed, the upgrade request is pending and the actual connection will not be established. If the $connect request fails (e.g., due to AuthN/AuthZ failure or an integration failure), the connection will not be made.

0 Answers
Related