Error:
Value null at 'tableName' failed to satisfy constraint: Member must not be null;
Value null at 'item' failed to satisfy constraint: Member must not be null"
When:
While posting data to DynamoDB table through API Gateway
How I solved that error:
By adding a Body-Mapping template in the Integration Request
In the API > whatever resource > whatever method > Integration Request > Body mapping template, added a new template "application/json" as given below
{
"TableName": "yourTableName",
"Item": {
"inputField1": {
"S": "$input.path('$.tableItemAttribute1')"
},
"inputField2": {
"S": "$input.path('$.tableItemAttribute2')"
},
"inputField3": {
"S": "$input.path('$.tableItemAttribute3')"
}
}
}