I need to create IDs to use as key on DynamoDB. Checked https://github.com/uuidjs/uuid but the ids generated are too long to be remembered. how can I generate shorter ones like the ones from youtube video Id. also do I really need to specify a Key or Dynamo can create one automatically for me just like firebase firestore for example?
this is the code that I'm using.
var db = new AWS.DynamoDB.DocumentClient();
var student = {
TableName: "students",
Item: {
id: "abc123",
name: "Mia",
},
};
db.put(student)
.promise()
.then((response) => console.log(response))
.catch((err) => console.log(err));
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment