# AWS RDS logs and metrics

Updated Nov 22, 2026 · today

RDS can publish its engine logs to CloudWatch Logs, and publishes instance and cluster metrics under the `AWS/RDS` namespace. Both reach Epok through the shared setup on [AWS: logs and metrics](https://epok.cloud/docs/install/aws).

On this page: What you get Turn on logs Metrics Useful searches Troubleshooting

## What you get

- **Logs:** the engine logs you turn on, from groups like `/aws/rds/instance/<name>/error`, `/general`, `/slowquery`, `/audit` and `/postgresql`.
- **Metrics:** the `AWS/RDS` namespace, which includes CPU utilization, connections, free storage space and read/write IOPS.

Each log event is stored with `_msg`, `_time`, a `level` detected from the line, `service` (the last part of the group name, so `error` etc. become the service unless you filter by group), `log_group`, `log_stream`, `cloud.provider`, `cloud.account_id` and `cloud.region`.

## Turn on logs

1. In the RDS console, choose the database, then Modify, and under **Log exports** tick the logs to publish (error, general, slow query, audit, postgresql).
2. Or with the CLI: `aws rds modify-db-instance --db-instance-identifier <name> --cloudwatch-logs-export-configuration '{"EnableLogTypes":["error","slowquery"]}'`.
3. Add each resulting group (for example `/aws/rds/instance/<name>/error`) to `EPOK_LOG_GROUPS` and run the setup on [AWS: logs and metrics](https://epok.cloud/docs/install/aws).

## Metrics

The namespace is `AWS/RDS`. It is in the default metric stream list, so it arrives with the normal metrics setup.

## Useful searches

```
log_group:"/aws/rds/instance/db1/error"       # engine errors for one instance
log_group:"/aws/rds/instance/db1/slowquery"    # slow queries only
service:slowquery _time:1h                     # slow queries from every instance
_msg:"connection" _time:1h                     # recent connection-related lines
```

## Troubleshooting

1. **No log groups appear.** Log exports were not enabled on the instance, or the instance type does not support publishing the chosen log type. Re-check the Modify page.
2. **Slow query log is empty.** For MySQL and MariaDB, set `slow_query_log` to 1 in the DB parameter group. Only queries slower than `long_query_time` (default 10 seconds) are written. Lower it if you want more.
3. **Metrics missing.** The metrics stack is separate from the logs stack and a fresh metric stream can take 3 to 15 minutes. Run `bash aws-metrics.sh --verify-only`.

Next

- [AWS: logs and metrics](https://epok.cloud/docs/install/aws): the one CloudFormation stack this page feeds into.
- [Search syntax](https://epok.cloud/docs/search-syntax): field filters, booleans and pipes.
