How can we run sql on mysql RDS and get the output on SNS?

0

How can we run sql on mysql RDS and get the output on SNS?

2개 답변
0

What is your use case? One way to achieve that is by using Lambda that will execute the SQL and then publish to SNS topic but there are probably other ways to achieve that. Depending on what is your desired outcome and the specific use case.

profile pictureAWS
Niko
답변함 일 년 전
  • Hi Niko,

    I want to monitor the blocking session and locked tables in the database. Whenever blocking happens in database we should receive an alert with the details of sessions causing blocking. Also if the table is lock for more than defined time duration in my sql script then we should receive an email alert.

  • Thanks for proving more context. I am not a DB specialist but I found this article - https://aws.amazon.com/premiumsupport/knowledge-center/rds-aurora-postgresql-query-blocked/ and it explains how to monitor blocked queries. As I mentioned before, you can use Lambda or other means to run a query against pg_stat_activity table to notify your admin about blocking. Hope this helps but if not let us know

0

Thanks Niko. I will try to use lambda for this.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인