More Related Content
More from Sugawara Genki (7)
200k/sec
- 13. h"p://goo.gl/A4XuXA
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB({
accessKeyId: '...',
secretAccessKey: '...',
region: 'us-east-1'
});
exports.handler = function(event, context) {
var params = {
Item: {
id: {S: context.invokeid},
time: {S: (new Date()).toString()}
},
TableName: 'test'
}
dynamodb.putItem(params, function(err, data) {
if (err) { throw err; }
context.done();
});
};