serverless
serverless copied to clipboard
New stack - Dynamodb atomic counter
Last month I had to implement a system on a client that uses many incremental keys for many different systems and architectures. The requirements were: 1 - Must be fast 2 - Must be serverless 3 - Must be resilient 4 - It must be cheap 5 - This should ensure that the numbers are not repeated, even with millions of requests.
So, I implemented a solution based on this article [1] and using the CDK.
I hope this stack helps other people
[1] https://itnext.io/simple-atomic-counter-with-dynamodb-and-api-gateway-e72115c209ff