Home icon

Automated PII redaction for Amazon RDS for PostgreSQL audit logs

Database Blog



This article demonstrates how to deploy a serverless pipeline that automatically redacts PII from Amazon RDS for PostgreSQL audit logs and stores them irreversibly in Amazon S3 for compliance.

  • Permanently removes SSNs, credit cards, emails, names, and 30+ PII types from audit logs before archiving
  • Uses AWS Step Functions, Amazon Comprehend, and CloudFormation for automated redaction pipeline
  • Stores redacted logs in S3 and makes them queryable through Amazon Athena
  • Provides irreversible redaction unlike CloudWatch Logs Data Protection's reversible masking
  • Includes validation queries to confirm no PII patterns remain in archived logs
  • Deployable via single CloudFormation template with three deployment options
  • Estimated cost: $73/month at low activity, $161/month at high activity

The solution enables organizations to meet GDPR, HIPAA, and PCI-DSS compliance requirements by creating permanent, auditor-safe archives of database audit logs with all sensitive data irreversibly removed.



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

Jul 7
2026
Automate PostgreSQL audit log extraction and analysis with Amazon S3
Jan 21
2026
Automate the export of Amazon RDS for MySQL or Amazon Aurora MySQL audit logs to Amazon S3 with batching or near real-time processing
Aug 26
2024
Copy and mask PII between Amazon RDS databases using visual ETL jobs in AWS Glue Studio
Jun 7
2024
Turn petabytes of relational database records into a cost-efficient audit trail using Amazon Athena, AWS DMS, Amazon RDS, and Amazon S3

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.