How to generate an authentication token to connect to Websocket API using HTTP @connections endpoints.

0

Hello community, I have set up an API gateway using lambda to connect EC2 and BUBBLe through API coonector I have tested using wscat , its worked fine , but I have added the URL for the production API i got this response raw response for the api status code 403 {"message", "missing authentification token"}. Where can i found the token ?, i tried cloudwatch with no success

best

1개 답변
0

1. What is 403 {"message": "missing authentification token"} error?

  • This is a generic error returned from API Gateway REST API endpoints due to various reasons such as API request made to non-existent resource or method, unsigned API request made to method secured by AWS_IAM and so on. Please refer to this article for details.

2. How do we call @connections endpoints for API Gateway Websocket API using HTTP requests?

  • As noted in this documentation here, @connections URL for WebSocket APIs is used to send a callback message to a connected client, get connection information, or disconnect the client. All calls here need a connectionId in Url path for client context and they must use IAM authorization with SigV4.

3. What could be going on here in our use case?

  • We would need more clarity into the setup here for a precise answer but do confirm if you are using the @connections endpoint with client context(i.e. valid connectionId in Url path) and AWS_IAM SigV4 signature.
  • You could also enable CloudWatch logs & access logs for your stage as noted here for more context but do note that this may lead to additional CloudWatch charges.

For further help, we may need details that are non-public information. Please open a support case with AWS using the following link.

AWS
지원 엔지니어
답변함 일 년 전
profile picture
전문가
검토됨 한 달 전

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

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

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

관련 콘텐츠