Score:0

AWS API Gateway Websocket Does Not Route to Custom Routes

us flag

I have been struggling to get even a minimum-viable websocket API going on AWS's API Gateway all day. At this point, the gateway is routing all requests to the "$default" route but I am trying to trigger individual custom routes. What am I doing wrong?

My RouteSelectionExpression for the API is "$request.body.action", the custom route is described like this

UpdateRoute:
Type: AWS::ApiGatewayV2::Route
DependsOn:
  - UpdateIntegration
Properties:
  ApiId: !Ref SocketAPI
  RouteKey: update
  OperationName: UpdateRoute
  AuthorizationType: NONE
  Target: !Join
    - '/'
    - - 'integrations'
      - !Ref UpdateIntegration

and my websocket message is

{
"action": "update",
"board": "[[1, 1, 1], [1, 1, 1], [1, 1, 1]]"
}
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.