Common Architecture Patterns
Understand the authentication and authorization pattern for the WebSocket API.
We'll cover the following...
Integration
WebSocket API integration at the API Gateway works just as any REST API, except that the response integration isn’t mandatory. We can set up the API to invoke a Lambda function, any other AWS service, or even an external API. For example, we can have our WebSocket API wrapping another stateless API.
Integration with Lambda functions is easy to conceptualize because it fits well with the traditional three-tier architecture of API-Compute-DB. However, we have several other options when dealing with serverless microservices.
We can put the data directly into the database, translate it into an event or a notification, or queue it for eventual processing. This choice impacts API latency and the overall time required for the processing. It affects the API's resilience and the resulting application's ...