How do I download my Amazon RDS DB instance logs?
Last updated: 2020-12-09
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: