By using AWS re:Post, you agree to the Terms of Use

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


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

1 Answer

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:

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions