How to associate an api key to an API Gateway websockets API

0

I've created a websocket api and I'm trying to secure it with an api key. I've checked the checkbox API Key Required in the $connect route and it is working fine as I get a 403 error when I invoke the API without api key from wscat. However, after creating an api key, I can't figure out how to associate it to the websockets API. I've tried from the console and also from aws cli, but no luck.

Please, any help would be appreciated.

Best regards,

Juan Carlos González

gefragt vor 5 Jahren2469 Aufrufe
1 Antwort
1

As usually happens, the answer was in the documentation... In order to assign an api key to a websockets api, it must be done via usage plans:
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-api-key-source.html

beantwortet vor 5 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen