I am working on python flask with Dynamo DB ,is there any functionality to auto increment the primary key in AWS Dynamo DB (like SQL.AUTOINCREMENT), Any suggestion on this? how to handle the AUTOINCREMENT Feature in AWS DynamoDB.
1 Answers
1
votes
Generally speaking, using an auto-increment primary key is not going to be best practice. If you really want to do it, you could use a lambda function and another dynamodb table that stores the last used value, but you would be much better off picking a better primary key so that you don't run into performance problems down the road.
Generally speaking, a GUID is a very easy to use alternative for a primary key where you don't have another obvious field to use.