Using Web Socket AWS API Gateway to allow your event driven Lambda based API to push data to your clients.

David Sandor
Build Succeeded
Published in
7 min readJan 12, 2019

--

UPDATE 2: I wrote another article about making this configuration really simple here: https://medium.com/@david.sandor/announcing-sam-helper-a-simple-way-to-describe-your-aws-web-socket-api-gateway-dbc278fcfada

UPDATE 1: I figured out how to configure the WebSocket API Gateway with SAM. Please check out this story for that information: https://medium.com/@david.sandor/defining-websocket-api-gateway-endpoints-in-a-sam-template-4380ac5ef01b

There are lots of blog posts touting the evolution of Real-Time or Event Driven API Architectures but how do you connect your clients to this type of an API?

Github Repo with Complete Solution
https://github.com/dsandor/example-ws-api-gateway

Note: I simplified this content to be focused on the actual Web Socket API Gateway and Push Response technology portion of the architecture. Subsequent articles will build on this article and integrate it into ReactJS and Vue.js frameworks.

The diagram above shows a Web Socket client submitting a request. Let’s assume this request is one that we would not want the user to wait for a response on. For example, maybe it is a chat type message or a bid for buying a…

--

--