Skip to content

Amazon S3

BUILDING Destination · built and tested, not yet verified against production accounts. Contact us before relying on it.

PortPilot writes each synced table to your S3 bucket as gzipped JSON Lines files, one file per table per sync, in Hive-style date partitions. Use it as a data lake landing zone, or query the files with Athena, Redshift Spectrum, Snowflake or Databricks external tables.

  1. Create or pick a bucket.

  2. Grant write access, scoped to the bucket and prefix PortPilot will use:

    {
    "Version": "2012-10-17",
    "Statement": [
    { "Effect": "Allow", "Action": ["s3:PutObject", "s3:DeleteObject"],
    "Resource": "arn:aws:s3:::<bucket>/<prefix>*" },
    { "Effect": "Allow", "Action": "s3:ListBucket",
    "Resource": "arn:aws:s3:::<bucket>" }
    ]
    }
    • Hosted deployment: attach the policy to an IAM user and create an access key for it.
    • AWS BYOC deployment: attach the policy to the PortPilot job’s IAM role and leave the key fields empty.

    s3:DeleteObject is only used by full-refresh tables (see below).

In the app, go to Destinations → New destination → Amazon S3 and click Test connection after filling in:

Field Required Default Description
bucket Yes — Bucket name.
prefix No — Key prefix inside the bucket, e.g. portpilot/.
region No — Bucket region, e.g. us-east-1.
access_key_id No — IAM user access key. Leave empty to use the job’s IAM role (AWS BYOC).
secret_access_key No* — Required with access_key_id. Stored write-only.
  • Each source table or stream gets its own folder, named after it.
  • Gzipped JSON Lines, one file per table per sync: <prefix><table>/dt=YYYY-MM-DD/<run_id>.jsonl.gz.
  • <prefix><table>/_schema.json holds the latest columns, types, primary key and cursor.
  • Values keep their JSON types: nested objects and arrays stay nested, timestamps are ISO 8601 strings.
  • dt= is the date the sync ran (UTC), not a date from the data.

Each record also carries these PortPilot fields:

FieldMeaning
_pipestream_extracted_atWhen the sync read the record (ISO 8601). Use it to pick the latest version of a row.
_pipestream_run_idThe sync run that wrote it.
_pipestream_tableSource table or stream name.
_pipestream_seqPosition of the record in the run's file.
  • Incremental tables (upsert or append): each sync adds a new file. Files are never rewritten, so a record updated in the source appears again in a later file. For the current state, keep the row with the latest _pipestream_extracted_at per primary key (listed in _schema.json).
  • Full-refresh tables (replace): the new file is written first, then the table’s older files are deleted, so the table is never empty.
  • Re-running a sync overwrites that run’s own file, so retries never duplicate data.
  • Deduplicate when you read. Incremental tables hold every version of a changed record. A view such as QUALIFY ROW_NUMBER() OVER (PARTITION BY id ORDER BY _pipestream_extracted_at DESC) = 1 gives the current state.
  • JSON Lines only. Parquet and CSV aren’t available yet.
  • Deletes aren’t represented. Records deleted at the source stay in earlier files.
  • Hosted deployments need an access key. PortPilot’s hosted jobs run on Google Cloud, so they can’t use an AWS role. Rotate the key periodically and update the destination.