Home icon

Export Amazon RDS for MySQL and MariaDB databases to Amazon S3 using a custom API

Database Blog



This article explains how to export databases from Amazon RDS for MySQL and MariaDB to Amazon S3 using a custom API. It provides a serverless solution that allows users to invoke an API to initiate database backups, which are then stored in S3.

Specifically, the article covers:

  • Solution overview and architecture
  • Prerequisites (AWS account, CLI, CDK, Docker)
  • Creating database credentials and storing them in Secrets Manager
  • Deploying the solution using AWS CDK
  • Granting ECS access to database security groups
  • Retrieving API Gateway information
  • Invoking a backup via the API
  • Troubleshooting backup failures using CloudWatch and ECS logs
  • Scaling up ECS tasks for larger databases
  • Best practices and lessons learned
  • Cleaning up resources


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

Aug 29
2024
Migrate Amazon RDS for Oracle BLOB column data to 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 8
2024
Amazon RDS for Db2 supports loading data from Amazon S3
Aug 5
2024
Migrate an on-premises MySQL database to Amazon Aurora MySQL over a private network using AWS DMS homogeneous data migration and Network Load Balancer

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.