Search⌘ K
AI Features

WebSocket API

Discover how the AWS API Gateway WebSocket API supports bidirectional communication, allowing servers and clients to exchange messages continuously. Learn the connections management using connection IDs and understand the event-driven architecture pattern that powers real-time apps like multi-user chat through Lambda and DynamoDB integration.

What’s WebSocket?

The REST API works on the HTTP protocol, which is unidirectional. The client sends a request to the server and gets a response. However, the server can’t go back to the client.

We need reverse communication in several business scenarios, like a chat application. When one user types the message, it must show on the other client. Therefore, the server can’t wait for the client to make an API call to fetch any pending notifications. Instead, the server must initiate ...