Mehmet Ali SARAÇ
10/03/2021, 12:10 PMthis.wsAuthorizerFn = new sst.Function(this, "ws-authorizer", {
  handler: "src/services/messenger.wsAuthorizer",
})
this.messengerApi = new sst.WebSocketApi(this, "messenger-service", {
  accessLog: false,
  authorizationType: sst.WebSocketApiAuthorizationType.CUSTOM,
  authorizer: new HttpLambdaAuthorizer({
    authorizerName: `LambdaAuthorizer`,
    handler: this.wsAuthorizerFn
  }),
  routes: {
    $connect: {
      handler: "src/services/messenger.onWebsocketConnected",
      environment: {
        WEBSOCKET_CONNECTION_TABLE: this.connectionTable.tableName
      }
    },
    $disconnect: {
      handler: "src/services/messenger.onWebsocketDisconnected",
      environment: {
        WEBSOCKET_CONNECTION_TABLE: this.connectionTable.tableName
      }
    },
  }
})
failed: AuthorizerResultTtlInSeconds cannot be set for WEBSOCKET protocol Apis. (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: d46f8a9a-e138-4a00-8b9e-fc60c36e9da9; Proxy: null)Mehmet Ali SARAÇ
10/03/2021, 12:43 PMFrank
Frank
Frank
Frank
Mehmet Ali SARAÇ
10/04/2021, 6:04 AMHubert
10/04/2021, 3:17 PMAuthorizerResultTtlInSeconds cannot be set for WEBSOCKET protocol Apis. (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: 5a7ab438-c502-4494-a779-1e798b178382; Proxy: null)
With the same custom authorizer, I've been deploying it through SLS for the time being.Mehmet Ali SARAÇ
10/08/2021, 7:36 AMFrank
Frank
Frank