I come from Relational Database background and we have a way to populate timestamp for row creation and update. I am having difficulty finding similar feature for DynamoDB.
Java Solution using Annotation (Data modelling package)
You can use the DynamoDBAutoGeneratedTimestamp annotation.
@DynamoDBAutoGeneratedTimestamp(strategy=DynamoDBAutoGenerateStrategy.CREATE)
public Date getCreatedDate() { return createdDate; }
public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; }
@DynamoDBAutoGeneratedTimestamp(strategy=DynamoDBAutoGenerateStrategy.ALWAYS)
public Date getLastUpdatedDate() { return lastUpdatedDate; }
public void setLastUpdatedDate(Date lastUpdatedDate) { this.lastUpdatedDate = lastUpdatedDate; }
DynamoDBAutoGeneratedTimestamp