STL_ERROR table is one of the many system tables that Amazon Redshift manages. It records internal processing errors generated by the Amazon Redshift database engine. Know that this table does not record SQL errors or messages. So any resulting errors from executing your common SQL queries like typos or keyword or syntax mistakes do not get logged into this table. More details regarding this table are available in the STL_ERROR article of the Amazon Redshift documentation.
Querying or checking for records in
STL_ERROR might return one or more records, or maybe none at all. One particular type of error that gets recorded in this table is the
S3ServiceException error. This type of error is related to the use of the Amazon S3 service as a data source when running
UNLOAD SQL commands. This error appears when you either specify invalid S3 credentials (either a wrong access key ID or secret access key, or both), point to an invalid AWS region, or refer to a non-existing file inside your S3 bucket.