Notice: EDB will no longer offer the Hosted Cloud Service option for new customers. However, support will remain available for existing customers of the EDB Hosted plan. The associated documentation topics will soon be removed, and updates regarding the removal process will be shared as they become available. The 'Your Cloud Account' option will continue to be available.
With 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.
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.