01 Sign in to AWS Management Console.
02 Navigate to AWS Secrets Manager dashboard at https://console.aws.amazon.com/secretsmanager/.
03 In the navigation panel, select Secrets.
04 Click Store a new secret button from the dashboard top menu to initiate the secret setup process.
05 On Select secret type page, perform the following:
- Select Credentials for RDS database to configure the secret to store access credentials for an AWS RDS database instance.
- In the Username and Password fields, type the user name and password that grant access to the RDS database associated with the secret.
- From Select the encryption key dropdown list, choose the KMS key to use to encrypt the secret information.
- From Select which RDS database this secret will access, list select the Amazon RDS database instance associated with the new Secrets Manager secret.
- Click Next to continue the process.
06 On Secret name and description page, give the secret a unique name in the Secret name box and a short description in the Description box (optional). Create any necessary tag sets for your secret using the Tags form. Once the requested information is provided, click Next to continue.
07 On Store a new secret page, within Configure automatic rotation section, perform the following:
- Select Enable automatic rotation to enable automatic rotation feature for the new secret.
- Select a predefined (e.g. 30, 60, 90 days) or a custom value for the rotation interval from the Select rotation interval dropdown list.
- Select Create a new Lambda function to perform rotation option to create your own custom Lambda function for rotation and give your new Lambda function a name in the New AWS Lambda function name box, or select Use an existing Lambda function to perform rotation to implement an AWS Lambda function that you have previously created for rotating this type of secret and choose this existing Lambda function from Choose an AWS Lambda function dropdown list.
- Choose Next to continue.
08 On the Review page, verify the secret configuration details, then click Store to create the Amazon Secrets Manager secret that will manage your AWS RDS database credentials.
09 Once the following confirmation message is displayed: "Your secret <secret-name> has been successfully stored.", click See sample code button to access the sample code that you can use to update your applications in order to retrieve the new secret.
10 Repeat steps no. 4 – 10 to create new Secrets Manager secrets to store and manage database credentials for your AWS RDS instances available in the current region.
11 Change the AWS region from the navigation bar and repeat the process for other regions.