使用 AWS re:Post 即表示您同意 AWS re:Post 使用條款

We need help to add the "SQLSTATE error code" (e%) field to the log_line_prefix parameter.

0

Hi everyone, our audit verified a case where a read-only user appeared in the log as responsible for executing a DDL command, we performed all the necessary tests and saw that the command executed was not applied and we saw that even with an error the log is generated, so we need to add the field "SQLSTATE error code" (e%) in the log_line_prefix parameter to filter the results and remove the cases where the command was not applied. But the log_line_prefix parameter is blocked in AWS RDS, how can we get around this?

  • Please accept the answer if it was useful for you

已提問 8 個月前檢視次數 291 次
1 個回答
2

In AWS RDS, certain parameters, including log_line_prefix, are indeed managed and restricted for direct user modification due to the managed nature of the service, prioritizing stability and security. However, understanding the context and need to include "SQLSTATE error code" in your logs for clearer auditing and troubleshooting, here are a few approaches you might consider to address your requirement:

Using RDS Event Subscriptions for Notifications While this doesn't directly modify the log_line_prefix, you can create RDS Event Subscriptions to notify you about specific database events, including errors. This can help in monitoring and reacting to specific error codes, although it's more about alerting than logging.

profile picture
專家
已回答 8 個月前
profile picture
專家
已審閱 8 個月前
  • Thanks for the response Oleksii, I really understand the restriction because it is a managed service, but the point is that if I follow your request I will have to provide two proofs per month for the audit instead of one, that is, I will have to show the logs generated during the month and the alerts that may be received, in fact it makes it even more difficult because it is an alert, is it possible to direct this alert to a file in S3?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南