Base
Base for Idempotency utility
Usage Documentation
| CLASS | DESCRIPTION | 
|---|---|
| IdempotencyHandler | Base class to orchestrate calls to persistence layer. | 
IdempotencyHandler ¶
IdempotencyHandler(function: Callable, function_payload: Any, config: IdempotencyConfig, persistence_store: BasePersistenceLayer, output_serializer: BaseIdempotencySerializer | None = None, key_prefix: str | None = None, function_args: tuple | None = None, function_kwargs: dict | None = None)
Base class to orchestrate calls to persistence layer.
| PARAMETER | DESCRIPTION | 
|---|---|
| function_payload | JSON Serializable payload to be hashed 
                  
                    TYPE:
                       | 
| config | Idempotency Configuration 
                  
                    TYPE:
                       | 
| persistence_store | Instance of persistence layer to store idempotency records 
                  
                    TYPE:
                       | 
| output_serializer | Serializer to transform the data to and from a dictionary. If not supplied, no serialization is done via the NoOpSerializer 
                  
                    TYPE:
                       | 
| key_prefix | Custom prefix for idempotency key: key_prefix#hash 
                  
                    TYPE:
                       | 
| function_args | Function arguments 
                  
                    TYPE:
                       | 
| function_kwargs | Function keyword arguments 
                  
                    TYPE:
                       | 
| METHOD | DESCRIPTION | 
|---|---|
| handle | Main entry point for handling idempotent execution of a function. | 
Source code in aws_lambda_powertools/utilities/idempotency/base.py
                    | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |  | 
handle ¶
handle() -> Any
Main entry point for handling idempotent execution of a function.
| RETURNS | DESCRIPTION | 
|---|---|
| Any | Function response | 
Source code in aws_lambda_powertools/utilities/idempotency/base.py
              | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |  |