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!

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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인