Streaming data to an HTTP endpoint with Amazon Kinesis Data Firehose


Hi All, Trying to implement "Streaming data to an HTTP endpoint with Amazon Kinesis Data Firehose" using AWS Big Data blog Blog does not tell about "REST API in Amazon API Gateway" Mapping template - for Integration Request and Integration Response is configured. I am getting error HTTPEndpoint "missing requestId". How to set Integration Response & Method Response in API Gateway to work. Any help is much appreciated.

2 Answers

There are some good tutorials that can help you understand how to configure API Gateway -

profile pictureAWS
answered 2 years ago
profile picture
reviewed 2 months ago
  • @UdAWS - If my answer has helped you understand API Gateway better, can I request you to please accept my answer. Thanks


Kinesis DF expects a specific response format - see for details. The same responseId from the request sent to a HTTP destination must exist as well in the response. If you can not influence HTTP destination so it replies with the expected format you can use API Gateway Rest API with the integration type of HTTP. There you can define VTL templates to map responses from the target. The only way I know to remember requestId between the request and the response is to add an integration request template

#set($context.requestOverride.header.request-id = $util.parseJson($input.body).requestId)

and then in the integration response template:

#set($requestId = $context.requestOverride.header.request-id)
  "requestId": "$requestId",
  "timestamp": $context.requestTimeEpoch
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions