Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
middy-idempotent
π΅ π¬ βββββ ββββ ββββ βIdempotence Middy middleware for your AWS Lambdas
-
Redis
Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, Streams, HyperLogLogs, Bitmaps.
Each Lambda receives an event as part of their request.
Then, check at the Redis database if that hash already exists in the table. Weβll do this using the lib ioredis. That weβll pass an option to the middleware we are creating.
View on GitHub
As self-defined, Redis is:
Iβll leverage Middy, a lightweight middleware for Lambda in Node, which has a particularly cool feature (and a really helpful one for the task at hand) that is its onion-like middleware pattern implementation and the ability to create a middleware that can read the function after and before the handler, which is essential for idempotent APIs.