Referencing websocket api id in serverless template

0

To get the REST Api Gateway Id we can use something like this:

provider:
environment:
GW_URL:
Fn::Join:
- ""
- - "https://"
- Ref: "ApiGatewayRestApi"
- ".execute-api.${self:custom.region}.amazonaws.com/${self:custom.stage}"

See http://www.goingserverless.com/blog/api-gateway-url

I have added a websocket api gateway and would like to get the endpoint of it just like the rest api endpoint.

Compare:
GET - https://chjpngb443.execute-api.eu-central-1.amazonaws.com/test/facebook/messages
wss://rs1ekw8ha0.execute-api.eu-central-1.amazonaws.com/test

Note that the rest api and websocket api have differing ids, chjpngb443 and rs1ekw8ha0 respectively.

I couldn’t find a suitable Ref variable for the websocket api id. Does anyone know how to get this property?

demandé il y a 5 ans492 vues
1 réponse
0
répondu il y a 5 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions