Error InvalidParameterType: Expected params.Item['pid'] to be a structure in DynamoDB
Note: all these are happening on the local instance of DynamoDB. This is the code that I've used to create a table from the DynamoDB Shell: var params = { TableName: "TABLE-NAME", KeySchema: [ { AttributeName: "pid", KeyType: "HASH" } ], AttributeDefinitions: [ { AttributeName: "pid", AttributeType: "S" } ], ProvisionedThroughput: { ReadCapacityUnits: 1, WriteCapacityUnits: 1 } }; dynamodb.createTable(params, function(err, data) { if (err) console.log(JSON.stringify(err, null, 2)); else console.log(JSON.stringify(data, null, 2)); }); This is the function that is being called to add elements