Is it possible to get DynamoDB to automatically generate unique IDs when adding new items to a table?
I noticed the Java API mentions @DynamoDBAutoGeneratedKey so I\
By using schema based AWS dynamodb data mapper library in Node.js, Hash key (id) will be generated automatically. Auto generated ids are based on uuid v4.
For more details, have a look on following aws package.
Data Mapper with annotation
Data Mapper package for Javascript
Sample snipet
@table('my_table')
class MyDomainClass {
@autoGeneratedHashKey()
id: string;
@rangeKey({defaultProvider: () => new Date()})
createdAt: Date;
}