Skip to content

Commit 80b4073

Browse files
authored
Merge pull request #83 from yanwum/UpgradeDependency
Upgrade Pymysql connection keywords
2 parents 2524495 + 0b2c808 commit 80b4073

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

SecretsManagerRDSMariaDBRotationMultiUser/lambda_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def connect_and_authenticate(secret_dict, port, dbname, use_ssl):
395395
# Try to obtain a connection to the db
396396
try:
397397
# Checks hostname and verifies server certificate implictly when 'ca' key is in 'ssl' dictionary
398-
conn = pymysql.connect(secret_dict['host'], user=secret_dict['username'], passwd=secret_dict['password'], port=port, db=dbname, connect_timeout=5, ssl=ssl)
398+
conn = pymysql.connect(host=secret_dict['host'], user=secret_dict['username'], password=secret_dict['password'], port=port, database=dbname, connect_timeout=5, ssl=ssl)
399399
logger.info("Successfully established %s connection as user '%s' with host: '%s'" % ("SSL/TLS" if use_ssl else "non SSL/TLS", secret_dict['username'], secret_dict['host']))
400400
return conn
401401
except pymysql.OperationalError as e:

SecretsManagerRDSMariaDBRotationSingleUser/lambda_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def connect_and_authenticate(secret_dict, port, dbname, use_ssl):
372372
# Try to obtain a connection to the db
373373
try:
374374
# Checks hostname and verifies server certificate implictly when 'ca' key is in 'ssl' dictionary
375-
conn = pymysql.connect(secret_dict['host'], user=secret_dict['username'], passwd=secret_dict['password'], port=port, db=dbname, connect_timeout=5, ssl=ssl)
375+
conn = pymysql.connect(host=secret_dict['host'], user=secret_dict['username'], password=secret_dict['password'], port=port, database=dbname, connect_timeout=5, ssl=ssl)
376376
logger.info("Successfully established %s connection as user '%s' with host: '%s'" % ("SSL/TLS" if use_ssl else "non SSL/TLS", secret_dict['username'], secret_dict['host']))
377377
return conn
378378
except pymysql.OperationalError as e:

SecretsManagerRDSMySQLRotationMultiUser/lambda_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def connect_and_authenticate(secret_dict, port, dbname, use_ssl):
407407
# Try to obtain a connection to the db
408408
try:
409409
# Checks hostname and verifies server certificate implictly when 'ca' key is in 'ssl' dictionary
410-
conn = pymysql.connect(secret_dict['host'], user=secret_dict['username'], passwd=secret_dict['password'], port=port, db=dbname, connect_timeout=5, ssl=ssl)
410+
conn = pymysql.connect(host=secret_dict['host'], user=secret_dict['username'], password=secret_dict['password'], port=port, database=dbname, connect_timeout=5, ssl=ssl)
411411
logger.info("Successfully established %s connection as user '%s' with host: '%s'" % ("SSL/TLS" if use_ssl else "non SSL/TLS", secret_dict['username'], secret_dict['host']))
412412
return conn
413413
except pymysql.OperationalError as e:

SecretsManagerRDSMySQLRotationSingleUser/lambda_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def connect_and_authenticate(secret_dict, port, dbname, use_ssl):
375375
# Try to obtain a connection to the db
376376
try:
377377
# Checks hostname and verifies server certificate implictly when 'ca' key is in 'ssl' dictionary
378-
conn = pymysql.connect(secret_dict['host'], user=secret_dict['username'], passwd=secret_dict['password'], port=port, db=dbname, connect_timeout=5, ssl=ssl)
378+
conn = pymysql.connect(host=secret_dict['host'], user=secret_dict['username'], password=secret_dict['password'], port=port, database=dbname, connect_timeout=5, ssl=ssl)
379379
logger.info("Successfully established %s connection as user '%s' with host: '%s'" % ("SSL/TLS" if use_ssl else "non SSL/TLS", secret_dict['username'], secret_dict['host']))
380380
return conn
381381
except pymysql.OperationalError as e:

0 commit comments

Comments
 (0)