echoing-zebra-28421
06/01/2021, 5:57 PMconst notificationTable = new aws.dynamodb.Table(
"notificationTable",
{
readCapacity: 10,
writeCapacity: 10,
hashKey: "UUID",
attributes: [
{
name: "UUID",
type: "S",
},
],
}
);
const attributes = {
name: "Name custom",
item: [{ key: "key-custom", value: "value-custom" }],
};
const obj = {
UUID: { S: "04b12ed0-b431-11eb-87d6-03d0311066e5" },
CreatedAt: { S: "2021-05-13T21:20:37.275Z" },
Event: { S: "custom_events" },
NamedUser: { S: "<mailto:alex.quintero@gmail.com|alex.quintero@gmail.com>" },
Attributes: { S: JSON.stringify(attributes) },
Status: { S: "SEND" },
};
const notificationTableItem = new aws.dynamodb.TableItem(
"notificationTableItem",
{
tableName: notificationTable.name,
hashKey: notificationTable.hashKey,
item: `${JSON.stringify(obj)}`,
}
);
My result is: