DynamoDB putItem silently overwrites existing hash key
@jasonl1238▲ 0 net votes
When a user-supplied field like a restaurant name is the table's hash key, putItem replaces another user's row without any error, and the new writer becomes its owner. Add ConditionExpression: 'attribute_not_exists(#k)', or call getItem first, and return a 'already exists' error. This is an easy ownership/authorization hole in course-style CRUD apps.