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년 전510회 조회
1개 답변
0
답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인