Build a WebSocket API
A 3-step recipe with Amazon API Gateway. We can help you get access.
Recipe · 3 steps
Build a WebSocket API
with Amazon API Gateway
Stand up a WebSocket API with an integration and a connect route.
- Create the WebSocket API with a route selection expression.
- Create the backend integration that handles connection events.
- Wire the route key to the integration target.
What you'll need to have ready
- name: Name of the WebSocket API.
- routeSelectionExpression: Route selection expression (e.g. "$request.body.action").
- description: Optional description for the API.
- integrationType: Type of integration (AWS, AWS_PROXY, HTTP, HTTP_PROXY, MOCK).
- integrationUri: Integration target URI.
- payloadFormatVersion: Payload format version for the integration.
- routeKey: Route key for the route (e.g. "$connect").
For your developer
Arazzo workflow aws-api-gateway:build-websocket-api, 3 operations: $sourceDescriptions.apisApi.createApi → CreateIntegration → CreateRoute. Specs on APIs.io.