DocumentClient provides a simple way to work with items in DynamoDB
For example,
If you use DocumentCline to create a new item, you won't have to specify
DynamoDb API
|
DocumentClient API
|
var params = {
TableName: "Sample ",
Item: {
"Id": { S: "john@amazon.com" }
}
};
dynamodb.putItem(params, function (rst, err) { console.log(rst); console.log(err) });
|
var params = {
TableName: 'Sample ',
Item: {
"Id": "john@amazon .com"
}
};
docClient.put(params, function (rst, err) { console.log(rst); console.log(err) });
|
留言
張貼留言