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?

asked 5 years ago510 views
1 Answer
0
answered 5 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