RedShift Scheduled Query Failure Alerting Issues

1

Hi Team,

I am having issues while creating alerts for RedShift Scheduled Query.

Service : AWS RedShift Region : us-east-1(N. Virginia).

Exact Issue :

When we schedule a query in RedShift there we can enable the monitoring and it will send alerts for all the triggered queries but, I want whenever a query fails it should alert us.

Looking forward to hearing from you soon.

Thanks & Regards, Abhi sabhi8226@gmail.com

asked 3 years ago1.8K views
3 Answers
0

Here is the workaround can use : Amazon EventBridge

  1. go to Amazon EventBridge
  2. create Rules
  3. set Rule type as Rule with an event pattern instead of Schedule
  4. in Creation method choose Custom pattern (JSON editor)
  5. in Event pattern with JSON below
{
  "source": ["aws.redshift-data"],
  "detail-type": ["Redshift Data Statement Status Change"],
  "detail": {
    "state": ["FAILED"]
  }
}
  1. in Target type choose AWS service and select (new or use existing) SNS topic
  2. test the redshift schedule query (when failed)

hope it helps!

answered 7 months ago
0

Amazon SNS topics attached to a scheduled query is currently designed to only send out notifications every time the query gets triggered, but do not come with the additional details (like query failure or success).

To verify if a schedule query is a success or failure, we have the option to check (using CLI) as of now using redshift-data API 'describe-statement'. (https://docs.aws.amazon.com/redshift-data/latest/APIReference/API_DescribeStatement.html)

profile pictureAWS
answered 3 years ago
profile pictureAWS
EXPERT
reviewed 3 years ago
0

I did exactly what @JackH suggested, but for state: 'FINISHED' instead, for testing purposes, and it doesn't trigger when the query runs. Even though the event pattern matches the event when clicking Test pattern. Any suggestions?

profile picture
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions