Reputation: 85
I am trying to use apiGateway as proxy to dynamodb but for some reason the integration returns 404.
I have created a patch method resource in apiGateway. and used below data in integration mappingTemplate for testing:
{
"TableName": "Retool_Output",
"Item": {
"customerId": "1234",
"fav_movies": "Shalini"
}
}
but when i test this gateway, it does not update dynamodb and give 404 as shown below.
Tue Aug 06 17:03:56 UTC 2019 : Endpoint request body after
transformations: {
"TableName": "Retool_Output",
"Item": {
"customerId": "1234",
"fav_movies": "Shalini"
}
}
Tue Aug 06 17:03:56 UTC 2019 : Sending request to https://dynamodb.ap-
south-1.amazonaws.com//
Tue Aug 06 17:03:56 UTC 2019 : Received response. Status: 404, Integration
latency: 13 ms
Can someone suggest me how to resolve this issue.
Upvotes: 0
Views: 2395
Reputation: 85
Found the answer to the question. Basically we have to use POST method with action as PutItem for adding an item in dynamodb via apiGateway whereas I was using PUT method.
Upvotes: 5