How to Unload Data to S3 in Redshift
Last updated July 25, 2026 · By the SaturnSQL team
UNLOAD runs a SELECT and writes the result to S3 using an IAM role. By default it writes multiple files in parallel, one or more per slice; add PARALLEL OFF for a single file (up to 6.2 GB).
CSV with a header
UNLOAD ('SELECT id, customer_id, amount FROM orders WHERE created_at >= ''2026-07-01''')
TO 's3://my-bucket/exports/orders_'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftUnloadRole'
FORMAT AS CSV
HEADER
PARALLEL OFF
ALLOWOVERWRITE;Parquet for downstream tools
UNLOAD ('SELECT * FROM orders')
TO 's3://my-bucket/exports/orders/'
IAM_ROLE 'arn:aws:iam::123456789012:role/RedshiftUnloadRole'
FORMAT AS PARQUET;Single quotes inside the query string must be doubled. Parquet unloads are compressed and typed, so prefer them when the target is Spark, Athena, or another warehouse.
Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free