Security in Managed PostgreSQL

Who may do what (IAM), what is audited, how data is encrypted at rest, in backups and in transit, and who can reach a database.

Last updated 18 November 2026View as Markdown

IAM actions

Every operation is checked against your IAM policies. A database's resource name is rn:ews:<region>:<org>:rds:db/<db id>.

ActionAccessWhat it allows
rds:DescribeDBInstancesReadList DB instances
rds:CreateDBInstanceWriteCreate DB instances
rds:DeleteDBInstanceWrite · destructiveDelete DB instances
rds:StartDBInstanceWriteStart stopped DB instances
rds:StopDBInstanceWrite · destructiveStop running DB instances
rds:RebootDBInstanceWrite · destructiveReboot DB instances
rds:RotateDBStorageKeyWriteReplace the LUKS passphrase of every node’s encrypted data volume with a new key
rds:FailoverDBInstanceWrite · destructivePromote a replica and demote the current primary
rds:DescribeDBQueryStatsRead · sensitiveRead the statements a database spends its time on (pg_stat_statements)
rds:DescribeDBQueryInsightsReadRead query insights: statement history, findings, running sessions and the slow query log
rds:CancelDBSessionWrite · destructiveCancel a running statement or end a client session of a database
rds:ModifyDBQueryInsightsWriteChange query insights settings: the slow query log, auto_explain, and keeping plans with values
rds:CreateDBReadReplicaWriteAdd a read replica to a cluster
rds:DeleteDBReadReplicaWrite · destructiveRemove a read replica from a cluster
rds:DescribeDBBranchesReadList a database’s branches, their branch pool and its operations
rds:CreateDBBranchWriteCut a copy-on-write branch of a database (masked; builds the branch pool on first use)
rds:DeleteDBBranchWrite · destructiveDelete a branch and everything written to it
rds:ModifyDBBranchWriteChange when a branch expires
rds:GetDBBranchCredentialsRead · sensitiveRead the passwords of a branch’s login roles
rds:ModifyDBBranchSettingsWriteSet a database’s masking rules and pull-request branches, and refresh its branch pool
rds:CreateDBReplicationSlotWriteDeclare a logical replication slot (kept across failover on a cluster)
rds:DeleteDBReplicationSlotWrite · destructiveDrop a logical replication slot; its consumer has to resynchronise
rds:ModifyDBInstanceWrite · destructiveChange storage, server type, autoscaling, the maintenance window, or upgrade the minor version
rds:DescribeDBParametersReadRead the PostgreSQL parameters a database runs with, and their defaults
rds:DescribeDBLogFilesRead · sensitiveRead a database's PostgreSQL server log
rds:ModifyDBParametersWriteSet or reset PostgreSQL parameters (work_mem, timeouts, logging…)
rds:QueryDatabaseRead · sensitiveBrowse schemas, tables and rows, and run read-only queries
rds:DescribeDBSnapshotsReadList DB snapshots
rds:DescribeDBExtensionsReadList the Postgres extensions a database supports and which are enabled
rds:EnableDBExtensionWriteCreate a supported extension in a database, adding its library to the preload list if needed
rds:DisableDBExtensionWrite · destructiveDrop an extension from a database, with CASCADE only when confirmed
rds:DescribeDBLoginsReadList the per-person database logins and their open sessions
rds:CreateDBLoginWriteCreate a named Postgres login (read-only or read-write) whose password is filed in Secrets
rds:DeleteDBLoginWrite · destructiveRevoke a database login: end its sessions and drop its role
rds:ModifyDBLoginWriteSet or clear a database login's expiry (VALID UNTIL)
rds:RotateDBLoginPasswordWrite · destructiveGive a database login a new password, filed as a new version of its secret; the old one stops working
rds:ListBackupsReadList backups and the point-in-time recovery window
rds:CreateBackupWriteRequest an on-demand backup
rds:DeleteBackupWrite · destructiveDelete a backup taken by hand that is kept until deleted (older than the retention window it is removed from the repository)
rds:RestoreDBInstanceWrite · destructiveRestore a database to a point in time from its backups

Generated from the service’s IAM descriptor. Sensitive reads hand over secret material or source code and are recorded in the audit log like writes; destructive writes delete, overwrite or revoke.

  • Branch actions are checked on the parent database's resource name (rn:ews:de1:<org>:rds:db/<db id>), so a policy grants branching database by database. The console's capability "Branches" on a database bundles them.
  • Sensitive reads are recorded in the audit log even when they are allowed: rds:QueryDatabase (the data browser, which reads every table with the master credential, and which no read-only preset includes), rds:DescribeDBLogFiles (the server log carries statement text with its values), rds:DescribeDBQueryStats (the statements a database spends its time on, which name every table and column), and rds:GetDBBranchCredentials (a branch's passwords, a binding to a branch, the CI variable). rds:DescribeDBQueryInsights is an ordinary read, but is audited too while the database keeps plans with values.
  • Reading the master password or a login's password is secrets:GetSecretValue on its secret, and is recorded in the audit log.
  • Choosing your own encryption key at creation needs kms:Encrypt on that key.
  • Cancelling a restore needs rds:RestoreDBInstance on the source database.

Audit

Every write is recorded in the audit log with its outcome. So are: reading a secret value, browsing data, reading query statistics, reading the server log, reading branch credentials, cancelling a statement or ending a session (also in Activity), cancelling a restore, and every read of query insights (the Queries tab) while Show values and plans is on.

Encryption at rest

Every node's data volume is encrypted with LUKS2 (AES-256-XTS). Each volume has its own random key, held by the control plane wrapped under the platform key (see Key custody). A machine gets the key only at boot (see What runs on your machines). A volume detached from its machine, or a copy of its blocks, is unreadable. Deleting the database deletes the keys.

This covers single nodes, every cluster member and reader, a member rebuilt after its machine was lost (it opens its kept volume with that volume's key, or gets a new volume and key and copies from the leader), and a database restored from a backup.

Your own key. Choose one of your KMS keys under Encryption key when you create the database, or pass "kmsKeyId" to the create request. Every node volume's key is then wrapped by it, including volumes added later (readers, rebuilt members). Disabling the KMS key stops nodes from opening their disks at their next boot; deleting it (after its waiting period) makes the data unreadable for good. A restore takes the source's key unless you name another ("kmsKeyId", or null for the platform key). The key of an existing database's disks cannot be changed; restore into a new database with the key you want.

Backups are encrypted separately, with AES-256-CBC on the database machine before upload, one passphrase per database (see Back up a database).

The API reports both as encryption: { storage: "luks2" | "none", backups: "aes-256-cbc" | "none" }, and the Overview shows Disk encryption and Backup encryption. storage is none for a database created before disk encryption existed: its volumes stay unencrypted, a rebuilt member's included, and nothing changes them in place. To encrypt one, restore it into a new database, which is encrypted, and point your apps at the new one.

Rotate the disk keys

Replace ewdb-0123456789ab with your database's id. It needs rds:RotateDBStorageKey.

Not available in Console. Rotating the disk keys is in the CLI and API only.

Every node volume gets a new key: each node adds the new key to its volume, removes the old one and reports within five minutes; nothing restarts. The answer is 202 with each volume's key version, and the database's events say when each volume is done. The data is not re-encrypted: the rotation replaces the passphrase that unlocks the volume, not the volume key itself.

It is refused with 409 for a database created before disk encryption ("This database was created before disk encryption; its disks have no key to rotate. Restore it into a new database.") and while a rotation is still in progress ("A key rotation is already in progress").

Encryption in transit

Every port serves TLS on a database provisioned with a certificate, and a new database refuses clients that do not use it unless Require TLS was cleared at creation (see Require TLS). Certificates are issued per database by the installation's CA and renewed automatically; see Connect to a database.

Network exposure

A database is private unless you create it with publiclyAccessible: only machines in its network and the platform's control plane reach it. A public database answers on its ports from anywhere; the password is required either way, and TLS while Require TLS is on. A copy made by a restore in the console is private unless someone selects Reachable from the internet; through the API it takes the source's setting unless the request says publiclyAccessible. See Instances, clusters and endpoints.

Logins and the platform's role

Give each person a login of their own instead of sharing the master password (see Create a login). The platform works in your database as its own role, ews_platform, which your server log names and query statistics leave out (see What runs on your machines).

Did this page help you?