Automated RDS Snapshot Export to S3
CloudFormation: EventBridge + Lambda that exports RDS snapshots to S3 in Parquet format nightly, making them queryable via Athena without restoring the database.
Automated RDS Snapshot Export to S3
A CloudFormation stack that wires up an EventBridge scheduled rule to a Lambda function that triggers the RDS Snapshot Export API each night. Snapshots land in S3 in Parquet format, organized by table, and are immediately queryable via Athena — no database restore required.
What's Included
- EventBridge Rule — cron-based trigger at a configurable nightly time
- Lambda Function — calls
start_export_taskfor the latest automated snapshot of your target RDS instance - S3 Export Bucket — dedicated bucket with server-side encryption and lifecycle rules for older exports
- IAM Roles — least-privilege roles for both Lambda and the RDS export task
- Athena Workgroup — pre-configured workgroup pointing at the export bucket; query results stored separately
- CloudWatch Alarms — alert on Lambda errors and export task failures
What You Get
rds-snapshot-export.yml— CloudFormation templatelambda/export_handler.py— Lambda source included inline and as a separate fileathena-queries/— example Athena SQL queries against a sample schemaREADME.md— deploy instructions, parameter reference, and Athena query guide
Requirements
AWS CLI configured, an existing RDS instance with automated backups enabled, and IAM permissions to create Lambda, EventBridge, S3, and Athena resources.