Use the UNLOAD command. It will create at least one file per slice, you will have to merge the files by yourself.
unload ('__SQL__')
to 's3://__BUCKET__/__PATH__'
credentials 'aws_access_key_id=__S3_KEY__;aws_secret_access_key=__S3_SECRET__'
delimiter as ','
addquotes
escape