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?

已提问 5 年前507 查看次数
1 回答
0
已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则