Sunday, December 6, 2026
spot_img

Top 5 This Week

Related Posts

Enabling Email Notifications for PostgreSQL DB Snapshots in AWS RDS/Aurora for Audit Purpose

Enabling Email Notifications for PostgreSQL DB Snapshots in AWS RDS/Aurora for Audit Purpose

For audit and compliance requirements, database teams often need email notifications whenever PostgreSQL DB snapshots are created, completed, or deleted. In AWS RDS and Aurora PostgreSQL, this can be achieved using Amazon RDS Event Subscriptions with Amazon SNS email notifications.

Why Email Notifications Are Required for Audit

  • Provides evidence that DB snapshots were created successfully
  • Helps track manual and automated backup activity
  • Improves visibility into snapshot deletion events
  • Supports audit, compliance, and operational monitoring
  • Helps DBA and operations teams respond quickly to snapshot-related events

High-Level Architecture

Amazon RDS / Aurora PostgreSQL Snapshot Event
→ RDS Event Subscription
→ Amazon SNS Topic
→ Email Notification to DBA / Audit / Operations Team

Step 1: Create an SNS Topic

Create an Amazon SNS topic that will be used to send email notifications.

aws sns create-topic \
  --name rds-postgres-snapshot-audit-notifications

After running this command, AWS will return the SNS Topic ARN. Save this ARN because it will be required in the next steps.

Step 2: Subscribe Email Address to SNS Topic

Subscribe the DBA, audit, or operations team email address to the SNS topic.

aws sns subscribe \
  --topic-arn arn:aws:sns:us-east-1:123456789012:rds-postgres-snapshot-audit-notifications \
  --protocol email \
  --notification-endpoint dba-team@example.com

After this command is executed, AWS will send a confirmation email to the subscribed email address. The recipient must open the email and click Confirm subscription. Notifications will not be delivered until the subscription is confirmed.

Step 3: Create RDS Event Subscription for PostgreSQL DB Snapshots

For standard Amazon RDS PostgreSQL DB snapshots, create an RDS event subscription using the source type db-snapshot.

aws rds create-event-subscription \
  --subscription-name postgres-snapshot-audit-events \
  --sns-topic-arn arn:aws:sns:us-east-1:123456789012:rds-postgres-snapshot-audit-notifications \
  --source-type db-snapshot \
  --event-categories creation deletion notification \
  --enabled

Step 4: Create Event Subscription for Aurora PostgreSQL Cluster Snapshots

For Aurora PostgreSQL, snapshots are usually cluster snapshots. Use the source type db-cluster-snapshot.

aws rds create-event-subscription \
  --subscription-name aurora-postgres-cluster-snapshot-audit-events \
  --sns-topic-arn arn:aws:sns:us-east-1:123456789012:rds-postgres-snapshot-audit-notifications \
  --source-type db-cluster-snapshot \
  --event-categories backup notification \
  --enabled

Step 5: Test the Notification

Create a manual snapshot to verify that the email notification is working.

For RDS PostgreSQL

  1. Go to the Amazon RDS Console.
  2. Select the PostgreSQL DB instance.
  3. Click Actions.
  4. Select Take snapshot.
  5. Enter a snapshot name.
  6. Create the snapshot.

For Aurora PostgreSQL

  1. Go to the Amazon RDS Console.
  2. Select the Aurora PostgreSQL cluster.
  3. Click Actions.
  4. Select Take snapshot.
  5. Enter a cluster snapshot name.
  6. Create the snapshot.

Step 6: Validate Email Notification

Validation Item Expected Result
SNS topic created Yes
Email subscription confirmed Yes
RDS event subscription enabled Yes
Snapshot event categories selected Yes
Manual snapshot test completed Yes
Email notification received Yes
Email retained for audit evidence Yes

Snapshot-Related Events Example

Source Type Example Events
DB Snapshot – RDS PostgreSQL
  • Creating manual DB snapshot
  • Manual DB snapshot created
  • Automated DB snapshot created
  • Deleting manual DB snapshot
DB Cluster Snapshot – Aurora PostgreSQL
  • Creating manual DB cluster snapshot
  • Manual DB cluster snapshot created
  • Automated DB cluster snapshot created
  • Deleting manual DB cluster snapshot

Best Practices

  • Use a shared DBA or audit distribution list instead of an individual email address.
  • Enable notifications in every AWS Region where PostgreSQL databases exist.
  • Create separate event subscriptions for Production and Non-Production environments.
  • Retain email notifications as audit evidence.
  • Periodically test snapshot notifications.
  • Monitor both snapshot creation and deletion events.
  • Use Amazon EventBridge and AWS Lambda for advanced use cases such as ticket creation or custom notification formatting.

Conclusion

Enabling email notifications for PostgreSQL DB snapshots is a simple but important audit control. By using Amazon RDS Event Subscriptions with Amazon SNS, DBA and audit teams can receive timely notifications whenever snapshots are created, completed, or deleted.

This improves backup visibility, strengthens compliance readiness, and provides useful audit evidence for database snapshot activity in AWS RDS and Aurora PostgreSQL environments.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Popular Articles