Skip to content

Commit 30c3494

Browse files
Sleekbobby1011malachi-constantjaidisidokukushking
authored
1128 s3 proxy support with data wrangler (#1361)
* exposing 'verify' argument for boto3 session classes * formatting * adding 'verify' to config * Modify tutorial to include verify and test again * Tmp fix - Reduce size test shot * Increase size test * Run full test * Run full tests without rerun * Fix _config to not delete verify Co-authored-by: lucas hanson <[email protected]> Co-authored-by: Abdel Jaidi <[email protected]> Co-authored-by: kukushking <[email protected]>
1 parent d4162c6 commit 30c3494

File tree

3 files changed

+342
-16
lines changed

3 files changed

+342
-16
lines changed

awswrangler/_config.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class _ConfigArg(NamedTuple):
4848
"secretsmanager_endpoint_url": _ConfigArg(dtype=str, nullable=True, enforced=True),
4949
# Botocore config
5050
"botocore_config": _ConfigArg(dtype=botocore.config.Config, nullable=True),
51+
"verify": _ConfigArg(dtype=str, nullable=True),
5152
}
5253

5354

@@ -68,6 +69,7 @@ def __init__(self) -> None:
6869
self.dynamodb_endpoint_url = None
6970
self.secretsmanager_endpoint_url = None
7071
self.botocore_config = None
72+
self.verify = None
7173
for name in _CONFIG_ARGS:
7274
self._load_config(name=name)
7375

@@ -153,7 +155,7 @@ def __getitem__(self, item: str) -> _ConfigValueType:
153155

154156
def _reset_item(self, item: str) -> None:
155157
if item in self._loaded_values:
156-
if item.endswith("_endpoint_url"):
158+
if item.endswith("_endpoint_url") or item == "verify":
157159
self._loaded_values[item] = None
158160
else:
159161
del self._loaded_values[item]
@@ -394,6 +396,15 @@ def botocore_config(self) -> botocore.config.Config:
394396
def botocore_config(self, value: Optional[botocore.config.Config]) -> None:
395397
self._set_config_value(key="botocore_config", value=value)
396398

399+
@property
400+
def verify(self) -> Optional[str]:
401+
"""Property verify."""
402+
return cast(Optional[str], self["verify"])
403+
404+
@verify.setter
405+
def verify(self, value: Optional[str]) -> None:
406+
self._set_config_value(key="verify", value=value)
407+
397408

398409
def _insert_str(text: str, token: str, insert: str) -> str:
399410
"""Insert string into other."""

awswrangler/_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ def client(
115115
service_name=service_name,
116116
endpoint_url=endpoint_url,
117117
use_ssl=True,
118-
verify=verify,
119-
config=default_botocore_config() if botocore_config is None else botocore_config,
118+
config=botocore_config or default_botocore_config(),
119+
verify=verify or _config.config.verify,
120120
)
121121

122122

0 commit comments

Comments
 (0)