File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,8 @@ You can also have your own keyword arguments after the mandatory arguments.
47
47
# Obfuscate email before calling Lambda handler
48
48
if fields:
49
49
for field in fields:
50
- field = event.get(field, "")
51
50
if field in event:
52
- event[field] = obfuscate(field)
51
+ event[field] = obfuscate(event[ field] )
53
52
54
53
return handler(event, context)
55
54
Original file line number Diff line number Diff line change @@ -57,8 +57,9 @@ Use the decorator for fail fast scenarios where you want your Lambda function to
57
57
=== "event_parser_decorator.py"
58
58
59
59
```python hl_lines="18"
60
- from aws_lambda_powertools.utilities.parser import event_parser, BaseModel, ValidationError
60
+ from aws_lambda_powertools.utilities.parser import event_parser, BaseModel
61
61
from aws_lambda_powertools.utilities.typing import LambdaContext
62
+ from typing import List, Optional
62
63
63
64
import json
64
65
@@ -80,7 +81,7 @@ Use the decorator for fail fast scenarios where you want your Lambda function to
80
81
print(event.description)
81
82
print(event.items)
82
83
83
- order_items = [items for item in event.items]
84
+ order_items = [item for item in event.items]
84
85
...
85
86
86
87
payload = {
@@ -107,6 +108,7 @@ Use this standalone function when you want more control over the data validation
107
108
108
109
```python hl_lines="21 30"
109
110
from aws_lambda_powertools.utilities.parser import parse, BaseModel, ValidationError
111
+ from typing import List, Optional
110
112
111
113
class OrderItem(BaseModel):
112
114
id: int
You can’t perform that action at this time.
0 commit comments