I’m having trouble getting the IAM role setup to work for a Redshift scheduled query.
I created a role redshift-scheduled-query
that looks like:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": [
"events.amazonaws.com",
"redshift.amazonaws.com"
]
},
"Action": "sts:AssumeRole"
}
]
}
It also has the following permission policies:
- AmazonEventBridgeFullAccess
- AmazonRedshiftAllCommandsFullAccess
- AmazonRedshiftDataFullAccess
- AmazonRedshiftFullAccess
- AmazonRedshiftQueryEditor
- AmazonRedshiftQueryEditorV2FullAccess
Is there something else I’m missing? I also added redshift-scheduled-query
as an associated role to my redshift cluster
2
Answers
Having the following trust policy for the role I created worked:
You are missing the principal for the Redshift scheduler:
scheduler.redshift.amazonaws.com
. See https://docs.aws.amazon.com/redshift/latest/APIReference/API_ScheduledAction.html for details.