December 2019
Intermediate to advanced
382 pages
9h 43m
English
A recent addition to the feature set of API Gateway brought the ability to create WebSocket APIs. In the last screenshot, you can see that there are now two options for the types of API you can create. Because it is such a new feature, I wanted to cover it in depth in its own section.
Let's start by reviewing what WebSockets are and why they're so useful for frontend clients. WebSocket is actually a transmission protocol built on TCP (https://tools.ietf.org/html/rfc6455) and allows a two-way, long-lived connection between client and host. The protocol is now supported by most modern browsers.
The words long-lived don't gel well with serverless compute—think about the timeout for a Lambda. Usually, a Lambda will be invoked by an ...