aws-samples / aws-secrets-manager-rotation-lambdas

Contains Lambda functions to be used for automatic rotation of secrets stored in AWS Secrets Manager
MIT No Attribution
331 stars 282 forks source link

add multi-user rotation support for RDS-managed Aurora Admin Secrets #117

Closed adithyasolai closed 1 year ago

adithyasolai commented 1 year ago

Issue #, if available:

Description of changes: In the RDS-managed Admin Secret case, the Mulit-User Rotation Lambda fetches the engine value from the DescribeDBInstances API. In the Aurora MySQL/PostgreSQL case, this engine value is returned as aurora-mysql and aurora-postgresql. This causes the Lambda to crash since we currently check that the engine value is exactly mysql or postgres.

This CR adds aurora-mysql and aurora-postgresql as valid engine values to the check so that the Lambda does not crash out-of-the-box for RDS Aurora customers with managed Admin Secrets that attempt Multi-User Rotation.

This code change has already been live for a while, and customers have been receiving this updated code in newly-created Rotation Lambdas for a while, but this PR documents the code change in this public Github Repo.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.