Skip to content

Commit b57a1fe

Browse files
authored
docs(idempotency): fix register_lambda_context order (#1747)
1 parent 6676612 commit b57a1fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: docs/utilities/idempotency.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ When using `idempotent_function`, you must tell us which keyword parameter in yo
136136

137137
This example also demonstrates how you can integrate with [Batch utility](batch.md), so you can process each record in an idempotent manner.
138138

139-
```python hl_lines="4-5 16 21 29"
139+
```python hl_lines="4-5 16 21 30"
140140
from aws_lambda_powertools.utilities.batch import (BatchProcessor, EventType,
141141
batch_processor)
142142
from aws_lambda_powertools.utilities.data_classes.sqs_event import SQSRecord
@@ -164,9 +164,9 @@ When using `idempotent_function`, you must tell us which keyword parameter in yo
164164

165165
@batch_processor(record_handler=record_handler, processor=processor)
166166
def lambda_handler(event, context):
167+
config.register_lambda_context(context) # see Lambda timeouts section
167168
# `data` parameter must be called as a keyword argument to work
168169
dummy("hello", "universe", data="test")
169-
config.register_lambda_context(context) # see Lambda timeouts section
170170
return processor.response()
171171
```
172172

0 commit comments

Comments
 (0)