You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/utilities/idempotency.md
-16
Original file line number
Diff line number
Diff line change
@@ -160,22 +160,6 @@ When using `makeIdempotent` on arbitrary functions, you can tell us which argume
160
160
161
161
The function this example has two arguments, note that while wrapping it with the `makeIdempotent` high-order function, we specify the `dataIndexArgument` as `1` to tell the decorator that the second argument is the one that contains the data we should use to make the function idempotent. Remember that arguments are zero-indexed, so the first argument is `0`, the second is `1`, and so on.
162
162
163
-
### Idempotent Decorator
164
-
165
-
You can also use the `@idempotent` decorator to make your Lambda handler idempotent, similar to the `makeIdempotent` function wrapper.
You can use the decorator on your Lambda handler or on any function that returns a response to make it idempotent. This is useful when you want to make a specific logic idempotent, for example when your Lambda handler performs multiple side effects and you only want to make a specific one idempotent.
178
-
The configuration options for the `@idempotent` decorator are the same as the ones for the `makeIdempotent` function wrapper.
@@ -25,7 +24,7 @@ You can use the package in both TypeScript and JavaScript code bases.
25
24
## Intro
26
25
27
26
This package provides a utility to implement idempotency in your Lambda functions.
28
-
You can either use it to wrap a function, decorate a function, or as Middy middleware to make your AWS Lambda handler idempotent.
27
+
You can either use it to wrap a function, or as Middy middleware to make your AWS Lambda handler idempotent.
29
28
30
29
The current implementation provides a persistence layer for Amazon DynamoDB, which offers a variety of configuration options. You can also bring your own persistence layer by extending the `BasePersistenceLayer` class.
The decorator configuration options are identical with the ones of the `makeIdempotent` function. Check the [docs](https://docs.powertools.aws.dev/lambda/typescript/latest/utilities/idempotency/) for more examples.
229
-
230
166
### Middy middleware
231
167
232
168
If instead you use Middy, you can use the `makeHandlerIdempotent` middleware. When using the middleware your Lambda handler becomes idempotent.
0 commit comments