Hubert
08/31/2021, 12:10 PMfunctions:
authorizer:
handler: fn_authorizer.lambda_handler
runtime: nodejs14.x
connection-manager:
handler: fn_connection_manager.lambda_handler
events:
- websocket:
route: $connect
authorizer:
name: authorizer
identitySource:
- "route.request.querystring.Auth"
- websocket:
route: $disconnect
This applies the custom authorizer for the $connect route. It's an IAM response. I've noticed that SST does handle IAM authorizer for WebSockets but it doesn't look to handle a custom lambda function to handle the authentication. Is there maybe a CDK solution? Or an SST solution that I'm just missing?
My current solution was to deploy the Websockets via SST and then use the above yaml to attach the authorizer and routes. But this solution relies on cloud watch and cloud watch is lacking proper logging for websockets in my experience.
note: connection-manager has a python runtime (not that this should change anything but yeah).
ThanksFrank
Frank
Hubert
08/31/2021, 5:38 PMJP (junaway)
09/21/2021, 5:52 PMFrank