- Newest
- Most votes
- Most comments
Hi
There are a guidance for websocket custom domain names here : https://docs.aws.amazon.com/apigateway/latest/developerguide/websocket-api-custom-domain-names.html
By the way some points to consiere 1- the DNS will take some time to be propagated 2- your TLS version shall be TLS 1.2 for websockets this is the only one supported at the moment 3- for authorization you need the querystring to be passed
wish that will help
The API Gateway domain name resolves to different IPv4 addresses than the hostname for the direct execute-api url for my API Gateway API. Is this normal behavior and, if so, what do the diffent Ipv4 address for the api vs the Api Gateway Domain refer to? (I used DNS resolution to verify that the DNs had propagated properly before attempting to connect via the custom domain name.)
Go to API Gateway >> Custom Domain Names >> API Mappings
Check is your stage and path mapped correctly? I.e if your stage is called prod, is your path also prod or is it blank?
If they are both prod, it would be wss://domain/prod? to map correctly to the api gateway prod stage
If the path is blank, wss://domain? would map correctly to the prod stage
For my api mappings, my stage has a name like ab1 and in the api mapping I have both stage and path set like ab1. When connecting from my client I connect to wss://custom_domain/ab1. I have experiemented with variants of this but the websocket connection never successfully upgrades.
Relevant content
- asked a year ago
- asked 2 years ago
- asked a year ago
- asked 2 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Some further info. For my api mappings, my stage has a name like ab1 and in the api mapping I have both stage and path set like ab1. When connecting from my client I connect to wss://custom_domain/ab1. I have experimented with variants of this but the websocket connection never successfully upgrades and does not seem to normally cause any logging by my authorizer lambda or for my stage logging (when authorizer is disabled) at all so doesn't seem to even reach my api.
The API Gateway domain name resolves to different IPv4 addresses than the hostname for the direct execute-api url for my API Gateway API. Is this normal behavior and, if so, what do the diffent Ipv4 address for the api vs the Api Gateway Domain refer to? (I used DNS resolution to verify that the DNs had propagated properly before attempting to connect via the custom domain name.)