API Gateway Integration: BadRequestException: Invalid mapping expression specified Terraform SNS integration

0

What is wrong with this particular piece of terraform and why I am getting an error.

resource "aws_apigatewayv2_integration" "place_order" {
  api_id              = aws_apigatewayv2_api.gateway.id
  credentials_arn     = aws_iam_role.gateway_role.arn
  integration_type    = "AWS_PROXY"
  integration_subtype = "StepFunctions-StartSyncExecution"


  request_parameters = {
    StateMachineArn = aws_sfn_state_machine.process_order.arn
    Input           = jsonencode({
      body = "$request.body"
    })
  }

  lifecycle {
    create_before_destroy = true
  }
}

According to https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html $request.body should "API Gateway passes the entire request body through."

But I am getting an error:

Error: updating API Gateway v2 integration: BadRequestException: Invalid selection expression specified: Validation Result: warnings : [], errors : [Invalid source: {"body":"$request.body"} specified for destination: Input]
답변 없음

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

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

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

관련 콘텐츠