AWS Secrets Manager integration
Suggest editsWith Cloud Service, you can use AWS Secrets Manager. AWS Secrets Manager helps you manage, retrieve, and rotate database credentials, access keys, and other secrets throughout their lifecycle.
To create a secret manager:
Create a PostgreSQL cluster on the Console.
Create and save an access key.
Create a secret in AWS Secrets Manager for your psql credentials.
Create the secret manager using a Lambda script or using the AWS console:
Lambda script:
Using the created secret:
AWS console:
- Search for Secret Manager under Services.
- Select Store a new secret.
- On the Choose secret type page, select Credentials for other databases and provide:
- Username
- Password
- Encryption key
- Database Provide the server address, database name and port as per the selected database engine. Select Next.
- On the Configure secret page, provide Secret name. Optionally, you can provide:
- Description
- Tags
- Resource permissions
- Replicate secret Select Next.
- Optionally, on the Configure rotation page, provide details.
- Review the code in different languages like: Java, JavaScript, C#, Python3, Ruby, Go, and Rust. To create the secret manager, select Store.
Create the secret in the centralized Secrets Manager for your access key.
Create a sample login application.
For example, using a Lambda script:
Fetch all the rows from the database:
Example
In this example, a script file has all the commands required to create a Secrets Manager rotation Lambda function, execute the rotation script, and execute the sample application.
- On this page
- Example
Could this page be better? Report a problem or suggest an addition!