Skip to content

Commit 74a6325

Browse files
committed
Adapting get_connection for old boto versions.
1 parent f8f1ec5 commit 74a6325

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

awswrangler/catalog/_get.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,12 +515,10 @@ def get_connection(
515515

516516
res = client_glue.get_connection(**_catalog_id(catalog_id=catalog_id, Name=name, HidePassword=False))["Connection"]
517517
if "ENCRYPTED_PASSWORD" in res["ConnectionProperties"]:
518-
settings = client_glue.get_data_catalog_encryption_settings(**_catalog_id(catalog_id=catalog_id))
519518
client_kms = _utils.client(service_name="kms", session=boto3_session)
520-
pwd = client_kms.decrypt(
521-
CiphertextBlob=base64.b64decode(res["ConnectionProperties"]["ENCRYPTED_PASSWORD"]),
522-
KeyId=settings["DataCatalogEncryptionSettings"]["ConnectionPasswordEncryption"]["AwsKmsKeyId"],
523-
)["Plaintext"]
519+
pwd = client_kms.decrypt(CiphertextBlob=base64.b64decode(res["ConnectionProperties"]["ENCRYPTED_PASSWORD"]))[
520+
"Plaintext"
521+
]
524522
res["ConnectionProperties"]["PASSWORD"] = pwd
525523
return cast(Dict[str, Any], res)
526524

0 commit comments

Comments
 (0)