capabilities.work

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

Stand up a WebSocket API with an integration and a connect route.

  1. Create the WebSocket API with a route selection expression.
  2. Create the backend integration that handles connection events.
  3. 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.