Glossary
WebSocket (API Gateway WebSocket API)
An API Gateway API that keeps each browser connection open, so your backend can push messages at any time.
Think of it as: An open phone line instead of sending letters back and forth.
What to know for Level 0
- A WebSocket API keeps each browser connection open so the backend can push messages at any time. Each connection gets a connection id.
- Every WebSocket API has built-in routes:
$connect, $disconnect and $default (any message no other route matches). - The backend pushes by POSTing to
@connections/{id}, which its role must allow with execute-api:ManageConnections.
More detail
Normal HTTP is ask-then-answer. A WebSocket stays open in both directions. API Gateway’s WebSocket API holds the connections for you and gives each one a connection id. Your backend pushes a message by POSTing to the @connections/{id} URL, which IAM must allow (execute-api:ManageConnections).
Quiz yourself on WebSocket (API Gateway WebSocket API) →
← All terms