Skip to content

Commit fb8db4c

Browse files
crus-umichCaitlin Russell
andauthored
supported engine update (#131)
Co-authored-by: Caitlin Russell <caitarus@amazon.com>
1 parent 3af4764 commit fb8db4c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

SecretsManagerRDSMySQLRotationSingleUser/lambda_function.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ def get_secret_dict(service_client, arn, stage, token=None):
418418
secret_dict = json.loads(plaintext)
419419

420420
# Run validations against the secret
421-
if 'engine' not in secret_dict or secret_dict['engine'] != 'mysql':
421+
supported_engines = ["mysql", "aurora-mysql"]
422+
if 'engine' not in secret_dict or secret_dict['engine'] not in supported_engines:
422423
raise KeyError("Database engine must be set to 'mysql' in order to use this rotation lambda")
423424
for field in required_fields:
424425
if field not in secret_dict:

SecretsManagerRDSPostgreSQLRotationSingleUser/lambda_function.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ def get_secret_dict(service_client, arn, stage, token=None):
429429
secret_dict = json.loads(plaintext)
430430

431431
# Run validations against the secret
432-
if 'engine' not in secret_dict or secret_dict['engine'] != 'postgres':
432+
supported_engines = ["postgres", "aurora-postgresql"]
433+
if 'engine' not in secret_dict or secret_dict['engine'] not in supported_engines:
433434
raise KeyError("Database engine must be set to 'postgres' in order to use this rotation lambda")
434435
for field in required_fields:
435436
if field not in secret_dict:

0 commit comments

Comments
 (0)