Back
S3 Wrapper
Overview
AWS S3 is Amazon's object storage service, storing over 500 trillion objects and handling 200 million requests per second. It's the foundation for data lakes, analytics pipelines, AI training datasets, and application storage at any scale.
The S3 Wrapper lets you query files stored in S3 directly from Postgres as foreign tables. Read CSV, JSON Lines, and Parquet files with plain SQL and join them against your application data. Works with any S3-compatible provider, including Supabase Storage, Wasabi, Cloudflare R2, and Backblaze B2. It is read-only and works with Supabase Vault for secure credential management.
Supported File Formats
| Format | Notes |
|---|---|
| CSV | With or without header line. All columns must be defined in the foreign table as text. |
| JSON Lines | All columns must be defined in the foreign table as text. |
| Parquet | Native type mapping supported. Compressed files are loaded fully into memory, so keep file sizes small. |
Supported Compression Algorithms
gzip, bzip2, xz, zlib
Required S3 Permissions
s3:GetObjects3:ListBucket
Supported Data Types for Parquet
| Postgres Type | Parquet Type |
|---|---|
| boolean | BOOLEAN |
| integer | INT32 |
| bigint | INT64 |
| real | FLOAT |
| double precision | DOUBLE |
| numeric | DECIMAL |
| text | BYTE_ARRAY / UTF8 |
| date | DATE |
| timestamp | TIMESTAMP_MILLIS / TIMESTAMP_MICROS |
Resources
Details
Third-party integrations and docs are managed by Supabase partners.