How do I download my Amazon RDS DB instance logs?
Last updated: 2019-11-19
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?
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.
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: