There is an very old issue that amazon haven't fixed for years now. If you have strange symbol(binary) in the logs download breaks. It is an issue with boto3 rds client, and for me is happening all the time. Error looks like that:
An error occurred (InvalidParameterValue) when calling the DownloadDBLogFilePortion operation: This file contains binary data and should be downloaded instead of viewed.
I just tried your script get_pg_log_files.sh and I get the same.
There is an very old issue that amazon haven't fixed for years now. If you have strange symbol(binary) in the logs download breaks. It is an issue with boto3 rds client, and for me is happening all the time. Error looks like that:
I just tried your script
get_pg_log_files.sh
and I get the same.