How to use Request Templates in API Gateway Websocket Integration?

0

I cannot get the Velocity RequestTemplates in my Websocket API integration to transform my input before sending my request to the integration.

Specifically I have created an AWS integration to Step Functions and need to transform the request to be {"input": { actual input }, "stateMachineArn": "arn of statemachine"}

I have tested with wscat specifying --header "Content-Type: application: json". My Request Template is mapped to "application/json". The CloudWatch logs for the Stage show the connection with the Content-Type header correct and also shows the routed request being routed properly. But the input before and after mapping is the same, so the Step Functions StartExecution call is returning 400.

Using the aws apigatewayv2 get-integrations I can confirm the RequestTemplates is set properly.

What is a simple of example of a Websocket API using RequestTemplates properly?

답변 없음

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

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

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

관련 콘텐츠