Kinesis Put Record - Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"kinesis:PutRecord"
],
"Resource": "*"
}
]
}
API Gateway - Kinesis Role
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"Service": "apigateway.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
create Kinesis Data Streams
API Gateway -> Intergration Request -> HTTP Headers
Content-Type = 'application/x-amz-json-1.1'
API Gateway -> Intergration Request -> Mapping Templates
Content-Type : application/json
{
"StreamName": "$input.params('stream')",
"Data": "$util.base64Encode($input.body)",
"PartitionKey": "$context.requestId"
}
API Gateway -> Method Request -> Request Validator
API Gateway -> Method Request -> Request Body
Content-Type : application/json
Model name : Empty
API Gateway -> Method Request -> URL Query String
Name : Stream