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/parser.md
+14-15Lines changed: 14 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,20 @@ The `@event_parser` decorator is ideal for:
89
89
90
90
Parser provides built-in models for parsing events fromAWS services. You don't need to worry about creating these models yourself - we've already done that for you, making it easier to process AWS events in your Lambda functions.
91
91
92
+
=== "sqs_model_event.py"
93
+
94
+
```python hl_lines="2 7"
95
+
--8<--"examples/parser/src/sqs_model_event.py"
96
+
```
97
+
98
+
=== "Sample event"
99
+
100
+
```json
101
+
--8<--"examples/parser/src/sqs_model_event.json"
102
+
```
103
+
104
+
The example above uses `SqsModel`. Other built-in envelopes can be found below.
@@ -179,21 +193,6 @@ Using `@event_parser` decorator to automatically parse the EventBridge event and
179
193
180
194
Parsers provides built-in envelopes to extract and parse specific parts of complex event structures. These envelopes simplify handling nested data in events from various AWS services, allowing you to focus on the relevant information for your Lambda function.
181
195
182
-
183
-
=== "sqs_model_event.py"
184
-
185
-
```python hl_lines="2 7"
186
-
--8<--"examples/parser/src/sqs_model_event.py"
187
-
```
188
-
189
-
=== "Sample event"
190
-
191
-
```json
192
-
--8<--"examples/parser/src/sqs_model_event.json"
193
-
```
194
-
195
-
The example above uses `SqsEnvelope` by importing `SqsModel`. Other built-in envelopes can be found below.
|**DynamoDBStreamEnvelope**|1. Parses data using `DynamoDBStreamModel`. ``2. Parses records in`NewImage`and`OldImage` keys using your model. ``3. Returns a listwith a dictionary containing `NewImage`and`OldImage` keys |`List[Dict[str, Optional[Model]]]`|
0 commit comments