Skip to content

Commit ceb6131

Browse files
Removing user agent tracking
1 parent ba534ed commit ceb6131

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

aws_lambda_powertools/utilities/data_masking/providers/aws_encryption_sdk.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
import base64
22
from typing import Any, Callable, Dict, List, Optional, Union
33

4-
import botocore
54
from aws_encryption_sdk import (
65
CachingCryptoMaterialsManager,
76
EncryptionSDKClient,
87
LocalCryptoMaterialsCache,
98
StrictAwsKmsMasterKeyProvider,
109
)
1110

12-
from aws_lambda_powertools.shared.user_agent import register_feature_to_botocore_session
1311
from aws_lambda_powertools.utilities.data_masking.constants import (
1412
CACHE_CAPACITY,
1513
MAX_CACHE_AGE_SECONDS,
@@ -37,9 +35,6 @@ class AwsEncryptionSdkProvider(BaseProvider):
3735
"a string"
3836
"""
3937

40-
session = botocore.session.Session()
41-
register_feature_to_botocore_session(session, "data-masking")
42-
4338
def __init__(
4439
self,
4540
keys: List[str],
@@ -54,7 +49,7 @@ def __init__(
5449
self.client = client or EncryptionSDKClient()
5550
self.keys = keys
5651
self.cache = LocalCryptoMaterialsCache(local_cache_capacity)
57-
self.key_provider = StrictAwsKmsMasterKeyProvider(key_ids=self.keys, botocore_session=self.session)
52+
self.key_provider = StrictAwsKmsMasterKeyProvider(key_ids=self.keys)
5853
self.cache_cmm = CachingCryptoMaterialsManager(
5954
master_key_provider=self.key_provider,
6055
cache=self.cache,

0 commit comments

Comments
 (0)