Connectors / Files & object stores

Amazon S3

source

AWS S3 object source

Install

cargo install faucet-cli --features source-s3
faucet init --source s3
# Cargo.toml — use it as a library
cargo add faucet-source-s3

Starter config

source:
  type: s3
  config:
    bucket: ""    # REQUIRED — S3 bucket name.
    # prefix: null    # Object key prefix filter.
    # include: null    # Glob over the whole object key selecting which listed objects to read (e.g.
    # region: null    # AWS region.
    # endpoint_url: null    # Custom endpoint URL for S3-compatible services (e.g.
    # credentials: { type: default }    # one of: default, profile, access_key, assume_role, web_identity, anonymous
      # --- Alternative variants — replace the block above with one of these ---
      # type: profile
      # config:
        # name: ""    # REQUIRED
      #
      # type: access_key
      # config:
        # access_key_id: ""    # REQUIRED
        # secret_access_key: ""    # REQUIRED
        # session_token: ""
      #
      # type: assume_role
      # config:
        # role_arn: ""    # REQUIRED
        # session_name: ""
        # external_id: ""
      #
      # type: web_identity
      #
      # type: anonymous
    # file_format: null    # Format of files stored in S3.
    # max_objects: null    # Maximum number of objects to read.
    # concurrency: 10    # Maximum number of concurrent object reads (default: 10).
    # batch_size: 1000    # Records per emitted `StreamPage`.
    # verify_length: true    # Verify each object's byte length against the length the store advertises, failing the read with `FaucetError::Source` on a short (truncated) or over-long transfer (#161).
    # verify_checksum: false    # Verify each object's body against the checksum the store advertises (#161).
    # max_object_bytes: 2147483648    # Largest object, once decompressed, that a format read whole (JSON array, raw text, CSV, XML, Excel, Avro, ORC, buffered Parquet, and JSON Lines under `verify_checksum`) may reach; a larger one fails with an error instead of exhausting memory.
    # max_decoded_bytes: 0    # Most bytes one object may decode to in memory where a format can expand past its input: an Avro file's records (per batch where the file streams), an Excel workbook's parts and shared strings.
    # compression: null    # User-facing compression config.
    # csv: { ... }    # CSV dialect.
    # excel: { ... }    # Excel worksheet selection.
    # xml: { ... }    # XML record framing.
    # avro: { ... }    # Avro read/write options.
    # orc: { ... }    # ORC read options.
    # parquet: { ... }    # Parquet reader options (the `parquet:` block of an object-store source).

Capabilities

Replay Non-deterministic replay
Exactly-once replay No
Incremental No
Dataset discovery Yes
Reports lag No
Compression Yes

Config fields

FieldTypeDefaultDescription
bucket
required
string — S3 bucket name.
prefix string — Object key prefix filter.
include string — Glob over the whole object key selecting which listed objects to read (e.g. exports/*.parquet). Without it, folder markers and objects with a _- or .-prefixed path segment below the prefix (_SUCCESS, _temporary/, .crc) are skipped; with it, exactly the matching keys are read.
region string — AWS region. None uses the SDK default.
endpoint_url string — Custom endpoint URL for S3-compatible services (e.g. MinIO).
credentials object type: default How to authenticate (default: the AWS default chain, i.e. the identity of the host faucet runs on). access_key names keys in the config; anonymous sends unsigned requests (public buckets).
file_format object json_lines Format of the files to read. Defaults to json_lines.
max_objects integer — Maximum number of objects to read.
concurrency integer 10 Maximum number of concurrent object reads (default: 10).
batch_size integer 1000 Records per emitted StreamPage. For JsonLines and RawText formats, the object body is decoded line-by-line via tokio::io::AsyncBufReadExt and a page is yielded whenever the buffer reaches this size; multi-object scans flatten so a single page may contain lines from any object. For JsonArray, each object is buffered fully before its records are chunked into pages of this size (see the README "Streaming and batching" section for the caveat). Defaults to DEFAULT_BATCH_SIZE.
verify_length boolean true Verify each object's byte length against the length the store advertises, failing the read with FaucetError::Source on a short (truncated) or over-long transfer (#161). Cheap — a byte counter over a body that is read anyway — so it defaults to true.
verify_checksum boolean false Verify each object's body against the checksum the store advertises (#161). Stronger than the length check but costs a hash over the full body, so it defaults to false. When the store advertises no usable checksum for an object, verification is skipped for that object (a debug log notes it); the length check still applies. A JSON Lines object is then read whole (up to max_object_bytes) and verified before any of its records is emitted.
max_object_bytes integer 2147483648 Largest object, once decompressed, that a format read whole (JSON array, raw text, CSV, XML, Excel, Avro, ORC, buffered Parquet, and JSON Lines under verify_checksum) may reach; a larger one fails with an error instead of exhausting memory. It also bounds one line of a streamed JSON Lines object, so an object with no newline fails the same way. Default 2 GiB.
max_decoded_bytes integer — Most bytes one object may decode to in memory where a format can expand past its input: an Avro file's records (per batch where the file streams), an Excel workbook's parts and shared strings. A file past it fails with an error instead of exhausting memory. Default 64 × max_object_bytes, at most 16 GiB.
compression string | object auto Compression codec applied to each downloaded object. Defaults to CompressionConfig::Auto — the codec is resolved per-object-key, so a single source can read a mix of compressed and uncompressed objects. Requires the crate-local compression feature.
csv object delimiter: ","has_headers: truequote: "on_unknown_field: widen CSV dialect, used when file_format: csv (#604).
excel object header_row: 0 Worksheet selection, used when file_format: xlsx (#604).
xml object record_element: recordroot_element: records Record framing, used when file_format: xml (#604).
avro object codec: null Reader schema, used when file_format: avro (#719).
orc object {} Column projection, used when file_format: orc (#719).
parquet object {} Column projection, used when file_format: parquet (#777): only parquet.columns are decoded, before any row group is read.
Get started

Your first pipeline runs in five minutes.

Install the CLI, scaffold a config, and move real data — nothing external to stand up.

curl -LsSf https://github.com/faucet-hq/faucet-stream/releases/latest/download/faucet-cli-installer.sh | sh
brew install faucet-hq/faucet-stream/faucet-cli