'AWS EventBridge Rule with Redshift - Procedure not being called
I've created an event rule to call a redshift stored procedure, using temporary credentials.
From Redshift I can see that the role is successfully getting credentials to log onto the cluster & db as the intended user ..but I cannot see any trace of the Stored Procedure being called.
User has Grant Usage on the correct schema, and execute on the procedure itself. Nothing in STL_QUERY or STL_ERROR to even show an attempt at a call.
Looked in CloudTrail, I can see an 'ExecuteStatment' event with 'Success', but the requestparameters.sql value is given as "OMITTED".
Unsure where to look next in order to find the issue ? I'm assuming that once the connection has been authenticated, then nothing AWS IAM related would be involved further.
Wondering if I've missed something obvious, or a quirk of eventbridge conifg/functionalty ?
Event Rule target
{
"Targets": [
{
"Id": "target_xxxxxxxxx",
"Arn": "arn:aws:redshift:us-east-1:xxxxxxxxxxxx:cluster:xxxxxxxxxx",
"RoleArn": "arn:aws:iam::xxxxxxxxxxx:role/xxxxxxxxx",
"RedshiftDataParameters": {
"Database": "xxxxxxxx",
"DbUser": "service_xxxxxxxxxx_scheduler",
"Sql": "CALL control.post_load_refresh();",
"StatementName": "myteststatement",
"WithEvent": false
}
}
]
}
STL_CONNECTION_LOG
username: IAM:service_xxxxxxxxxx_scheduler
event: authenticated
event: initiating session
event: set application_name
event: set application_name event: disconnecting session
DB Perms to execute procedure
GRANT USAGE ON SCHEMA control to "IAM:service_xxxxxxxxxx_scheduler";
GRANT EXECUTE on PROCEDURE control.post_load_refresh() TO "IAM:service_xxxxxxxxxx_scheduler";
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|