Separate the connection gate from message handling
How WebSocket connection lifecycles, connection-time authorization, route integrations, and connection callbacks support bidirectional messaging. · advanced
A WebSocket API separates a long-lived connection from the route invocations that process its messages. This diagram uses Lambda integrations and an application-owned connection registry; its arrows show logical operations, not every response.
A Lambda REQUEST authorizer can run only on $connect. It is separate from the route integration that performs application work. Connection-time authorization is therefore not a fresh authorizer decision for each later message.
Keep the component roles precise: IAM supplies permissions, not executable Lambda authorizer logic. Elastic Load Balancing can support WebSocket traffic, but does not implement API Gateway's named WebSocket routes and Lambda REQUEST authorizer mechanism.
1 / 7 The client starts a WebSocket connection through API Gateway. The $connect route runs while connection establishment is pending.
AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.