1
{
"DeliveryStreamName": "[STREAMNAME]",
"Record": {
"Data": "$util.base64Encode($input.body)"
}
}
내가 싶은 것이 요청을하는 클라이언트의 $context.identity.sourceIp
처럼 인코딩되는 $input.body
에 정보를 추가하십시오.
Kinesis Firehose로 전달되는 출력을 Base64 인코딩해야 할 때 어떻게해야합니까?
#set($inputRoot = $input.path('$'))
#set($data = "{
#foreach($key in $inputRoot.keySet())
""$key"": $input.json($key),
#end
""clientIP"": ""$context.identity.sourceIp"",
}")
{
"DeliveryStreamName": "[STREAMNAME]",
"Record": {
"Data": "$util.base64Encode($data)"
}
}
내가 알고하지 않았다 : 나는이 일을 다음 얻을 관리 조금 더 파고 후
{
"x": 1,
"y": 2,
"z": 3,
..., // all the properties from the JSON-request by the client
"clientIp": "x.x.x.x" // property added by API-Gateway into client's object
}