Skip to main content
PostgreSQL accounts let you manage access to your PostgreSQL databases. Users connect through Web Access (a browser-based interface) or CLI (a local proxy), and every session can be recorded.

Creating an account

1

Start adding an account

Go to Privileged Access Management → Accounts and select Add Account.
2

Select a folder and template

Choose which folder to add the account to, then select a PostgreSQL template (e.g., the default postgres or a custom one).
3

Enter connection details

Already have a connection string? Paste it into the Host field and the remaining fields are filled in for you, credentials included. Both postgresql://user:password@host:5432/database and host=... port=... dbname=... forms work.
4

Choose authentication method

PostgreSQL supports two authentication methods:
Standard PostgreSQL login with username and password.
5

Save

Select Create.

AWS IAM authentication

RDS and Aurora instances that require IAM database authentication use the AWS IAM auth method. No password is stored: Infisical generates a short-lived authentication token for each connection. Set the following up before creating the account.
1

Enable IAM authentication on the instance

Turn on IAM database authentication for the RDS instance or Aurora cluster.
2

Grant the database user IAM access

3

Create the role with a trust policy

Create the IAM role you’ll set as Role ARN. Replace <INFISICAL_AWS_ACCOUNT_ID> with the Infisical account ID for your region (US 381492033652, EU 345594589636) and <YOUR_INFISICAL_ORG_ID> with your Infisical Organization ID, found under Organization Settings.
Always include the External ID condition. Without it, another Infisical customer could potentially trick Infisical into assuming your role.
For Self-Hosted Instances: use the AWS account ID where your Infisical instance is deployed, since that is the account assuming the role.
4

Attach permission to connect

Attach a policy allowing the role to connect as that database user:
The resource ARN uses the instance’s resource ID (db-...), not its name. Find it under Configuration on the instance in the RDS console.
Set Host to the instance’s RDS or Aurora endpoint. Tokens are signed for that exact endpoint, so a CNAME or other alias is rejected.
IAM authentication requires an encrypted connection, so SSL Enabled is turned on and can’t be disabled. To verify the server certificate, turn on Reject Unauthorized and paste your region’s RDS root certificate into SSL Certificate, for example https://truststore.pki.rds.amazonaws.com/us-east-1/us-east-1-bundle.pem.
PAM authentication failed for user means AWS rejected the token rather than the database being unreachable. Check that the role’s rds-db:connect resource ARN uses the instance’s current resource ID, region, and the same database user the account connects as.
Credential rotation doesn’t apply to these accounts, since there is no stored password.

Connecting

Web Access provides a browser-based interface with two tools:
  • Data Explorer — browse tables, view data, filter and sort, edit rows, export to CSV/JSON
  • SQL Editor — write and run SQL queries, use transactions
To connect:
  1. Go to Privileged Access Management → Accounts
  2. Find the account and click the rocket icon (or select Launch Session from the menu)
  3. Click Connect in Browser

Next steps

SSH Accounts

Add SSH server accounts.

Sessions

View and manage sessions.