1
votes

We have access to other AWS redshift cluster. We want to unload one of the tables query results into our S3 bucket. Can we know what are all the permissions required to unload those results into our S3 bucket.

Tried to search in google but didn't find any related doc.

1

1 Answers

0
votes

If you can access a Redshift, any table/view and could do SELECT on it, then you should be able to unload that select as well. No special permissions are required as far as Redshift is concerned.

Though you need to have valid S3 IAM role or S3 Access/Secret Key to unload the data. Other way to look into unload is, its more of selecting bulk data and redirecting it to a physical store S3 for other purposes.

Here is official unload documentation page.

https://docs.aws.amazon.com/redshift/latest/dg/t_Unloading_tables.html

With S3 credentials

unload ('select * from venue')  to 's3://mybucket/tickit/venue_' access_key_id <access-key-id>' secret_access_key '<secret-access-key>'

With IAM Role,

 unload ('select * from venue') to 's3://mybucket/tickit/unload/venue_' iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole';