Api Gateway Websocket API with IAM Authorization on $connect route

0

Hi,

As mentioned in the title, I've enabled IAM Authorization on the $connect route of a API Gateway WebSocket API - I did this to protect it.

As I understand, in order to CONNECT (not to postToConnection!) I first need to "sign requests with Signature Version 4 (SigV4)", BUT I could not find an example related to WebSocket Connect - I've searched.

I plan to connect from browser JavaScript (yeah, I know :-D) - where I have temporary credentials -, but also a node.js example would be OK - or python... or whatever other language, or a hint in the right direction.

Thank you!

ams1
已提問 3 個月前檢視次數 92 次
1 個回答
0

You can find an example for SigV4 in Node.js here.

A CONNECT request is a regular HTTP request with an Upgrade header, so it is not different from signing other HTTP requests.

profile pictureAWS
專家
Uri
已回答 3 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南