- Newest
- Most votes
- Most comments
Here is the workaround can use : Amazon EventBridge
- go to Amazon EventBridge
- create Rules
- set Rule type as Rule with an event pattern instead of Schedule
- in Creation method choose Custom pattern (JSON editor)
- in Event pattern with JSON below
{
"source": ["aws.redshift-data"],
"detail-type": ["Redshift Data Statement Status Change"],
"detail": {
"state": ["FAILED"]
}
}
- in Target type choose AWS service and select (new or use existing) SNS topic
- test the redshift schedule query (when failed)
hope it helps!
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)
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?
Relevant content
- asked 3 years ago
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 months ago
Did it worked for you?