How do I download my Amazon RDS DB instance logs?

Last updated: 2022-06-08

I want to download the log files for my Amazon Relational Database Service (Amazon RDS) DB instance, but I can't locate the log files to download. How can I find and download the log files for my DB instance?

Short description

You can view and download logs for an RDS DB instance Amazon RDS console. You can also view, watch, download, or query the logs using the AWS Command Line Interface (AWS CLI) or API actions. However, the log output defaults for MySQL and MariaDB are to a table instead of to a file. You can't directly download the log data, because that data is stored in the mysql.general_log table or the mysql.slow_log table.


Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.

To be sure that you can access and download MySQL or MariaDB log files, first, set the log_output parameter to file. Then, enable logging. For DB-engine-specific information about logging, see the following resources:

Did this article help?

Do you need billing and technical support?