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/data_classes.md
+4-5
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,6 @@ Same example as above, but using the `event_source` decorator
50
50
if 'helloworld' in event.path and event.http_method == 'GET':
51
51
do_something_with(event.body, user)
52
52
```
53
-
54
53
**Autocomplete with self-documented properties and methods**
55
54
56
55

@@ -93,9 +92,9 @@ Use **`APIGatewayAuthorizerRequestEvent`** for type `REQUEST` and **`APIGatewayA
93
92
94
93
=== "app_type_request.py"
95
94
96
-
This example uses the `APIGatewayAuthorizerResponse` to decline a given request if the user is not found.
95
+
This example uses the `APIGatewayAuthorizerResponse` to decline a given request if the user is not found.
97
96
98
-
When the user is found, it includes the user details in the request context that will be available to the back-end, and returns a full access policy for admin users.
97
+
When the user is found, it includes the user details in the request context that will be available to the back-end, and returns a full access policy for admin users.
99
98
100
99
```python hl_lines="2-5 26-31 36-37 40 44 46"
101
100
from aws_lambda_powertools.utilities.data_classes import event_source
@@ -185,7 +184,7 @@ See also [this blog post](https://aws.amazon.com/blogs/compute/introducing-iam-a
185
184
186
185
=== "app.py"
187
186
188
-
This example looks up user details via `x-token` header. It uses `APIGatewayAuthorizerResponseV2` to return a deny policy when user is not found or authorized.
187
+
This example looks up user details via `x-token` header. It uses `APIGatewayAuthorizerResponseV2` to return a deny policy when user is not found or authorized.
189
188
190
189
```python hl_lines="2-5 21 24"
191
190
from aws_lambda_powertools.utilities.data_classes import event_source
@@ -290,7 +289,7 @@ In this example extract the `requestId` as the `correlation_id` for logging, use
Copy file name to clipboardExpand all lines: docs/utilities/idempotency.md
+3-7
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,6 @@ Configuration | Value | Notes
40
40
Partition key | `id` |
41
41
TTL attribute name | `expiration` | This can only be configured after your table is created if you're using AWS Console
42
42
43
-
44
43
!!! tip "You can share a single state table for all functions"
45
44
You can reuse the same DynamoDB table to store idempotency state. We add your `function_name` in addition to the idempotency key as a hash key.
46
45
@@ -127,13 +126,11 @@ Similar to [idempotent decorator](#idempotent-decorator), you can use `idempoten
127
126
128
127
When using `idempotent_function`, you must tell us which keyword parameter in your function signature has the data we should use via **`data_keyword_argument`** - Such data must be JSON serializable.
129
128
130
-
131
-
132
129
!!! warning "Make sure to call your decorated function using keyword arguments"
133
130
134
131
=== "app.py"
135
132
136
-
This example also demonstrates how you can integrate with [Batch utility](batch.md), so you can process each record in an idempotent manner.
133
+
This example also demonstrates how you can integrate with [Batch utility](batch.md), so you can process each record in an idempotent manner.
137
134
138
135
```python hl_lines="4 13 18 25"
139
136
import uuid
@@ -160,9 +157,9 @@ When using `idempotent_function`, you must tell us which keyword parameter in yo
0 commit comments