Home icon

How to use Amazon Aurora DSQL audit logs

Database Blog



This article explains how to configure and use Amazon Aurora DSQL audit logging to track SQL statements, identify who performed operations, and maintain audit records for compliance.

  • Audit logging records SQL statements by class (READ, WRITE, DDL, ROLE, FUNCTION, MISC) with configurable scope per role or cluster baseline
  • Logs are delivered to Amazon S3 via CloudWatch Logs vented log delivery and can be queried with Amazon Athena
  • Separate audit administration role from DBAs to prevent audited users from stopping or narrowing their own recording
  • Each audit record includes IAM identity, PostgreSQL role, transaction ID, statement text, and row counts for matching with CDC records
  • Configure two things: destination S3 bucket and what to record using ALTER SYSTEM SET or sys.set_audit_config function
  • Protect sensitive data by not logging bound parameters by default, encrypting with customer-managed KMS keys, and using S3 Object Lock for retention
  • Match audit logs with CloudTrail connection events using session ID to identify client IP addresses and connection sources

Aurora DSQL audit logging provides comprehensive SQL statement tracking with separation of duties, sensitive data protection, and integration with AWS services for compliance and security investigations.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Nov 11
2026
Diagnose Amazon Aurora MySQL performance using CloudWatch Database Insights
Jul 18
2024
Replace Amazon QLDB with Amazon Aurora PostgreSQL for audit use cases
Oct 13
2026
Monitor Amazon Aurora DSQL costs with the Aurora DSQL console and CloudWatch alarms
Aug 21
2026
Amazon Aurora DSQL now supports Amazon CloudWatch Database Insights

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.