Check out example codes for "copy table from redshift to s3". It will help you in understanding the concepts better.

Code Example 1

UNLOAD ('select * from my_schema.my_table')    
to 's3://bucket-name/file_’ 
iam_role 'arn:aws:iam::482569874589:role/RedshiftLoaderRole’;

Learn ReactJs, React Native from akashmittal.com