File tree 1 file changed +6
-1
lines changed
aws_lambda_powertools/utilities/batch
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ def sqs_batch_processor(
150
150
record_handler : Callable ,
151
151
config : Optional [Config ] = None ,
152
152
suppress_exception : bool = False ,
153
+ boto3_session : Optional [boto3 .session .Session ] = None ,
153
154
):
154
155
"""
155
156
Middleware to handle SQS batch event processing
@@ -168,6 +169,8 @@ def sqs_batch_processor(
168
169
botocore config object
169
170
suppress_exception: bool, optional
170
171
Supress exception raised if any messages fail processing, by default False
172
+ boto3_session : boto3.session.Session, optional
173
+ Boto3 session to use for AWS API communication
171
174
172
175
Examples
173
176
--------
@@ -188,7 +191,9 @@ def sqs_batch_processor(
188
191
189
192
"""
190
193
config = config or Config ()
191
- processor = PartialSQSProcessor (config = config , suppress_exception = suppress_exception )
194
+ session = boto3_session or boto3 .session .Session ()
195
+
196
+ processor = PartialSQSProcessor (config = config , suppress_exception = suppress_exception , boto3_session = session )
192
197
193
198
records = event ["Records" ]
194
199
You can’t perform that action at this time.
0 commit comments