Hi Guys,
Has any one configured lookup / query / GetItem in dynamodb from apigw? I'm struggling to get it work, so far I have configured these in my policy
1. Set Context variable - JSON Payload
{
Key: {
'ID' : {S: 'token'},
'Status' : {N: '1'}
},
TableName: 'token-table'
}
2. AWS 4 Signer - configured resource, aws access_id and key
3. Route via Http - http://dynamodb.ap-southeast-2.amazonaws.com/${aws4auth.resource}
with POST and RequestSource = context var from step 1
Headers set as below:
Authorization: ${aws4Auth.http.Authorization}
X-Amz-Date: ${aws4Auth.http.X-Amz-Date}
x-amz-content-sha256: ${aws4Auth.http.x-amz-content-sha256}
X-Amz-Target: DynamoDB_20120810.GetItem
I get ---> {"__type":"com.amazon.coral.service#SerializationException"}
Would appreciate any help with this.
Thanks,
Kunal