Skip to content

Amazon RDS and Aurora PostgreSQL

For Amazon RDS for PostgreSQL (13 to 18; 14 to 18 certified, 13 supported) and Amazon Aurora PostgreSQL (14 to 18, supported), Serverless v2 included. Your agents on EC2 collect it, from inside your VPC. Read Database monitoring first for pools, statuses, the privacy mode and the alarms, and PostgreSQL for what is collected.

Use an instance endpoint, or an Aurora cluster’s writer endpoint (<cluster>.cluster-<id>.<region>.rds.amazonaws.com). These are refused, and the database is not saved with them:

  • an RDS Proxy endpoint (.proxy-);
  • an Aurora reader endpoint (.cluster-ro-);
  • an Aurora custom endpoint (.cluster-custom-).

Each balances connections across several servers, so counters would mix. Use the instance endpoint or the cluster writer endpoint. See Pooled endpoints.

Connection When
Private (VPC) The collectors are in the database’s VPC (or a peered one). The usual choice, and the only one for Aurora PostgreSQL.
Public An RDS instance that is publicly accessible. Its security group must then allow only your collectors.
  • On the database’s security group, allow inbound TCP 5432 from the collectors’ security group (or their subnet).
  • No inbound rule is needed anywhere for WatchTower15: the agent connects out to the database and out to WatchTower15.
  • Keep the database private: a public endpoint must only allow the collectors.
  • On Aurora the collectors also reach rds.<region>.amazonaws.com (and, for a Serverless v2 instance at 0 ACU minimum, monitoring.<region>.amazonaws.com) on 443: through a NAT gateway, HTTPS_PROXY, or VPC interface endpoints.

TLS is required, and by default the agent verifies the certificate and the host name against the Amazon RDS CA bundle, built into the agent. The modes are on TLS and authentication.

Step 4 generates it for RDS or Aurora and your authentication. Run it as the master user. The password and the IAM scripts are exclusive per role. See Privileges and pg_stat_statements. pg_stat_statements is in the default shared_preload_libraries on RDS and Aurora, so only its CREATE EXTENSION is yours.

Source Authentication
RDS IAM authentication No password at all: a token minted from the instance role for each connection
AWS Secrets Manager Password, read at connect time with the instance role
AWS SSM Parameter Store Password, from SecureString parameters
File on the host Password, in a file on each collector

The IAM policy, with the Aurora cluster resource id, is on RDS IAM authentication. The credentials file and the CLI are as for self-managed PostgreSQL.

The read policy every Aurora PostgreSQL instance needs

Section titled “The read policy every Aurora PostgreSQL instance needs”

Before an Aurora PostgreSQL instance’s collector first connects, and every hour after, it reads the instance’s class and the cluster’s minimum capacity from the RDS API, so it never wakes a paused Serverless v2 instance. That needs, on the collector’s instance role:

  • rds:DescribeDBInstances and rds:DescribeDBClusters, for every Aurora PostgreSQL instance; and
  • for a Serverless v2 instance at 0 ACU minimum, also cloudwatch:GetMetricData: the agent checks CloudWatch every 60 seconds before it connects.

The collector must run on EC2 with an instance role in the cluster’s account and region. Without these actions the instance is never connected, and its collector reads Pause probe unavailable. The CloudWatch reads cost about $0.86 a month per instance on your own AWS bill, plus about $0.09 for each warm standby. WatchTower15 is never granted anything: the collector reads with its own role.

The collector’s line and the database’s banner say which of these applies:

Cause Fix
The role lacks the read actions Grant the collector’s role rds:DescribeDBInstances and rds:DescribeDBClusters (and, for Serverless v2 at 0 ACU minimum, cloudwatch:GetMetricData), then test again.
The collector has no AWS instance role An Aurora collector must run on EC2 with an instance role in the cluster’s account and region, holding rds:DescribeDBInstances and rds:DescribeDBClusters. Choose such a collector, then test again.
The role is in another account or region The collector’s instance role must be in the cluster’s account and region.
The name is a custom DNS name Point the name at the instance endpoint or the cluster writer endpoint, or use one of them.
The name is the reader endpoint Use the instance endpoint or the cluster writer endpoint, not the reader endpoint.
AWS answered with an error The agent retries every minute.

A Serverless v2 instance with a 0 ACU minimum pauses when it has no clients, and AWS resumes it when one connects. WatchTower15’s collector never wakes it:

  • No connection while paused. The collector reads the instance’s capacity and client connections from CloudWatch and does not connect while the instance is paused, or while it idles towards its pause with no other client. The database shows Paused by AWS (0 ACU) or Idle, left to pause by AWS: its status stays Active, its minutes are a covered band on the coverage strip, and Database unreachable counts it as answering.
  • Paused hours are billed. A collector’s report of a paused hour is an accepted report, so that hour is billed like any other, from the database’s first successful connection on.
  • A resume is not a restart. When AWS resumes the instance, the Info tab says Last resumed by AWS and Database restarted does not fire.
  • Setting up a paused database. A database that is paused when setup finishes is verified at its collector’s first read, once another client wakes it: Verify reads Waiting for the database to wake (paused by AWS) or Waiting for the collector’s first read (idle, left to pause by AWS). A wrong password or grant shows only then.
  • The warm standby never connects at 0 ACU. It checks its credential source every 10 minutes, and its network path when it becomes the active collector.
  • Testing from the CLI. db test <database-uuid> refuses a paused or idle database; db test <database-uuid> --wake connects anyway, which wakes it.

Aurora replicas share the cluster volume and use no WAL streaming to watch. An Aurora database’s Instance card reads Not applicable: Aurora replicas share the cluster volume, with no WAL streaming to watch, an Aurora reader sends no replication series, and the replication stopped and replication lag alarms never fire there. On RDS for PostgreSQL a read replica’s state and lag are collected and alarmed as on any standby.

After an Aurora failover the collector follows the cluster endpoint to the new writer. The reader and custom endpoints, which hand out different instances, are refused at setup (see The endpoint).

The eighteen alarms are on PostgreSQL; gaps and the coverage record are on Gaps and the coverage record.