Skip to content

Commit 6cddf76

Browse files
committed
feat(sqs): add optional config parameter
1 parent 680ee69 commit 6cddf76

File tree

1 file changed

+5
-3
lines changed
  • aws_lambda_powertools/utilities/batch

1 file changed

+5
-3
lines changed

aws_lambda_powertools/utilities/batch/sqs.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@
44
Batch SQS utilities
55
"""
66

7-
from typing import List
7+
from typing import List, Optional
88

99
import boto3
10+
from botocore.config import Config
1011

1112
from aws_lambda_powertools.middleware_factory import lambda_handler_decorator
1213

1314
from .base import BasePartialProcessor
1415

1516

1617
class PartialSQSProcessor(BasePartialProcessor):
17-
def __init__(self):
18-
self.client = boto3.client("sqs")
18+
def __init__(self, config: Optional[Config] = None):
19+
config = config or Config()
20+
self.client = boto3.client("sqs", config=config)
1921
self.success_messages: List = []
2022
self.fail_messages: List = []
2123

0 commit comments

Comments
 (0)