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/batch.md
+96-1Lines changed: 96 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1057,7 +1057,102 @@ When using Sentry.io for error monitoring, you can override `failure_handler` to
1057
1057
1058
1058
## Legacy
1059
1059
1060
-
!!! tip "This is kept for historical purposes. Use the new [BatchProcessor](#processing-messages-from-sqs) instead. "
1060
+
!!! tip "This is kept for historical purposes. Use the new [BatchProcessor](#processing-messages-from-sqs) instead."
1061
+
1062
+
1063
+
### Migration guide
1064
+
1065
+
!!! info "keep reading if you are using `sqs_batch_processor` or `PartialSQSProcessor`"
1066
+
1067
+
[As of Nov 2021](https://aws.amazon.com/about-aws/whats-new/2021/11/aws-lambda-partial-batch-response-sqs-event-source/){target="_blank"}, this is no longer needed as both SQS, Kinesis, and DynamoDB Streams offer this capability natively with one caveat - it's an [opt-in feature](#required-resources).
1068
+
1069
+
Being a native feature, we no longer need to instantiate boto3 nor other customizations like exception suppressing – this lowers the cost of your Lambda function as you can delegate deleting partial failures to Lambda.
1070
+
1071
+
!!! tip "It's also easier to test since it's mostly a [contract based response](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#sqs-batchfailurereporting-syntax){target="_blank"}."
1072
+
1073
+
You can migrate in three steps:
1074
+
1075
+
1. If you are using **`sqs_batch_decorator`** you can now use **`batch_processor`** decorator
1076
+
2. If you were using **`PartialSQSProcessor`** you can now use **`BatchProcessor`**
1077
+
3. Change your Lambda Handler to return the new response format
1078
+
1079
+
1080
+
=== "Decorator: Before"
1081
+
1082
+
```python hl_lines="1 6"
1083
+
from aws_lambda_powertools.utilities.batch import sqs_batch_processor
0 commit comments