2 Answers
- Newest
- Most votes
- Most comments
0
It is true that with an atomic counter the updates do not interfere with each other. At the same time you must be aware that the updates are not idempotent.
I the case in which the UpdateItem is unsuccessful, and you get a Network Error for example, you can't be sure that your update was executed or not. Then you probably will retry from your lambda function and the possibility of overcounting exists. So you may end up with the final value of your counter greater than 10 in your example.
If that is acceptable, then great! For scenarios where accuracy is important I advice using transaction with a client request token!
answered a year ago
Relevant content
- asked 4 years ago
- asked 4 years ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 3 years ago

Fantastic, thank you for confirming!