Connectors / Streaming & queues

AWS Kinesis

source

AWS Kinesis Data Streams consumer with per-shard checkpoints

Install

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

Starter config

source:
  type: kinesis
  config:
    stream_name: ""    # REQUIRED — Kinesis Data Stream name.
    # region: ""    # AWS region.
    # endpoint_url: ""    # Custom endpoint URL for LocalStack / VPC endpoints.
    # credentials: { type: default }    # one of: default, profile, access_key, assume_role, web_identity
      # --- 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
    # start_position: { type: trim_horizon }    # one of: trim_horizon, latest, at_timestamp, at_sequence_number, after_sequence_number
      # --- Alternative variants — replace the block above with one of these ---
      # type: latest
      #
      # type: at_timestamp
      # timestamp_secs: 0    # REQUIRED
      #
      # type: at_sequence_number
      # sequence: ""    # REQUIRED
      #
      # type: after_sequence_number
      # sequence: ""    # REQUIRED
    # shard_ids: []    # Explicit shard-id allowlist; empty = every shard.
    # include_closed: false    # Also consume closed (post-resharding) shards still inside the retention window that have no bookmark.
    # poll_interval_ms: 1000    # Base wait between `GetRecords` calls per shard, in milliseconds.
    # records_per_request: 500    # `GetRecords` `Limit` per request (1–10000).
    # shard_concurrency: 4    # Max concurrent `GetRecords` calls; every shard is still read, in turn.
    # idle_termination_secs: 0    # Stop after this many seconds without a new record across all shards.
    # max_messages: 0    # Stop after this many records in total.
    # value_format: null    # How each record's `Data` blob is decoded into the emitted `data` field.
    # batch_size: 1000    # Records per emitted `StreamPage`.
    # on_decode_error: null    # `KinesisSourceConfig::on_decode_error`.

Capabilities

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

Config fields

FieldTypeDefaultDescription
stream_name
required
string — Kinesis Data Stream name.
region string — AWS region. None uses the SDK default chain (env, profile, IMDS).
endpoint_url string — Custom endpoint URL for LocalStack / VPC endpoints.
credentials object type: default AWS credentials. Defaults to the SDK default provider chain.
start_position object type: trim_horizon Start position for shards with no persisted bookmark.
shard_ids array [] Explicit shard-id allowlist; empty = every shard.
include_closed boolean false Also consume closed (post-resharding) shards still inside the retention window that have no bookmark. A bookmarked closed shard is always drained, before its children. Default false.
poll_interval_ms integer 1000 Base wait between GetRecords calls per shard, in milliseconds. Floored at 200 ms (the per-shard 5 reads/sec API limit). Default 1000.
records_per_request integer 500 GetRecords Limit per request (1–10000). Default 500.
shard_concurrency integer 4 Max concurrent GetRecords calls; every shard is still read, in turn. Default 4.
idle_termination_secs integer — Stop after this many seconds without a new record across all shards. At least one of idle_termination_secs and max_messages must be set (mirrors the Kafka source) — a batch run must terminate.
max_messages integer — Stop after this many records in total.
value_format object json Payload decoding for the record data field.
batch_size integer 1000 Records per emitted StreamPage. 0 is the "no batching" sentinel: one page per drain cycle. Default 1000.
on_decode_error object fail What a record whose payload value_format cannot decode does: fail (default) fails the run naming the record; skip drops it (with a warning) and moves the shard's bookmark past it; raw emits it with data: { raw_base64, error }. Without skip/raw one bad record blocks its shard on every run.
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