Skip to content

Commit 5296bb8

Browse files
committed
fix(cd): enable auto deployment of websocket API changes
1 parent a90655b commit 5296bb8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cdk/resources/WebsocketAPI.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,9 @@ export class WebsocketAPI extends Construct {
240240
stageName: '2023-06-22',
241241
deploymentId: deployment.ref,
242242
apiId: api.ref,
243+
autoDeploy: true,
243244
})
244-
this.websocketURI = `wss://${api.ref}.execute-api.${
245-
Stack.of(this).region
246-
}.amazonaws.com/${prodStage.ref}`
245+
this.websocketURI = `${api.attrApiEndpoint}/${prodStage.ref}`
247246
// API invoke lambda
248247
onConnect.addPermission('invokeByAPI', {
249248
principal: new IAM.ServicePrincipal(

0 commit comments

Comments
 (0)