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 Resposta
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
ENGENHEIRO DE SUPORTE
respondido há um ano
profile picture
ESPECIALISTA
avaliado há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas