Connectors / Databases
Amazon DynamoDB
sourceAmazon DynamoDB source; parallel Scan, Query, or Streams CDC with resumable shard bookmarks
Install
cargo install faucet-cli --features source-dynamodb faucet init --source dynamodb
# Cargo.toml — use it as a library cargo add faucet-source-dynamodb
Starter config
source:
type: dynamodb
config:
table_name: "" # REQUIRED — Table name.
# region: "" # AWS region.
# endpoint_url: "" # Custom endpoint URL (DynamoDB Local, 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
# mode: null # What the source reads.
# segments: 1 # Parallel scan segments (`TotalSegments`), 1–1000000.
# max_concurrency: 8 # Segments read concurrently.
# index_name: "" # Secondary index to scan or query.
# projection: "" # `ProjectionExpression` — the attributes to return.
# filter_expression: "" # `FilterExpression` applied server-side after the read.
# key_condition_expression: "" # `KeyConditionExpression`.
# expression_attribute_names: {} # `ExpressionAttributeNames` (`#name` → attribute).
# expression_attribute_values: {} # `ExpressionAttributeValues` (`:value` → plain JSON value).
# consistent_read: false # Strongly consistent reads (table and local secondary indexes only).
# scan_index_forward: true # Query order: ascending sort key when `true` (default).
# page_limit: 0 # `Limit` per Scan/Query request (items evaluated per call).
# stream_arn: "" # Stream ARN.
# start_position: null # Where a stream shard starts when no bookmark exists for it.
# on_gap: null # What to do when the bookmark points before the Streams trim horizon (a resume after more than 24 hours, a re-enabled str…
# resnapshot_deletes: true # `on_gap: resnapshot`: after the re-read, delete the destination rows of items it did not see (default `true`; the sink must support cleanup).
# resnapshot_max_keys: 1000000 # `on_gap: resnapshot`: the most distinct keys the re-read tracks for its delete (default 1,000,000; memory grows with it).
# poll_interval_ms: 1000 # Base wait between `GetRecords` calls per shard, in ms (floored at 200).
# records_per_request: 1000 # `GetRecords` `Limit` per request (1–1000).
# shard_concurrency: 4 # Shards read concurrently.
# idle_termination_secs: 0 # Streams: stop after this many seconds without a new record.
# max_messages: 0 # Streams: stop after this many change records.
# retry: { ... } # Retry/backoff settings exposed on both connector configs.
# batch_size: 1000 # Records per emitted page.
# value_format: null # How records carry attribute values: `plain` JSON (the default) or DynamoDB's `typed` attribute JSON (`{"pk": {"S": "a"}, "tags": {"SS": [..]}}`).
Capabilities
| Replay | Non-deterministic replay |
|---|---|
| Exactly-once replay | No |
| Incremental | Yes |
| Dataset discovery | Yes |
| Reports lag | Yes |
| Compression | No |
Config fields
| Field | Type | Default | Description |
|---|---|---|---|
table_namerequired | string | — | Table name. |
region | string | — | AWS region. None uses the SDK default chain (env, profile, IMDS). |
endpoint_url | string | — | Custom endpoint URL (DynamoDB Local, LocalStack, VPC endpoints). |
credentials | object | type: default | AWS credentials. Defaults to the SDK default provider chain. |
mode | object | scan | scan (default), query, or streams. |
segments | integer | 1 | Parallel scan segments (TotalSegments), 1–1000000. Scan only. |
max_concurrency | integer | 8 | Segments read concurrently. Default 8. |
index_name | string | — | Secondary index to scan or query. |
projection | string | — | ProjectionExpression — the attributes to return. |
filter_expression | string | — | FilterExpression applied server-side after the read. |
key_condition_expression | string | — | KeyConditionExpression. Required for query, rejected otherwise. |
expression_attribute_names | object | — | ExpressionAttributeNames (#name → attribute). |
expression_attribute_values | object | — | ExpressionAttributeValues (:value → plain JSON value). |
consistent_read | boolean | false | Strongly consistent reads (table and local secondary indexes only). |
scan_index_forward | boolean | true | Query order: ascending sort key when true (default). |
page_limit | integer | — | Limit per Scan/Query request (items evaluated per call). |
stream_arn | string | — | Stream ARN. Defaults to the table's LatestStreamArn. Streams only. |
start_position | object | trim_horizon | Start for shards with no bookmark and no parent that was read. |
on_gap | object | fail | Reaction to a bookmark older than the trim horizon. |
resnapshot_deletes | boolean | true | on_gap: resnapshot: after the re-read, delete the destination rows of items it did not see (default true; the sink must support cleanup). false keeps the resnapshot for any sink but leaves the destination rows of items deleted while their stream records were trimmed. |
resnapshot_max_keys | integer | 1000000 | on_gap: resnapshot: the most distinct keys the re-read tracks for its delete (default 1,000,000; memory grows with it). A table with more items fails that run once with nothing deleted; its position is saved, so the next run resumes streaming. |
poll_interval_ms | integer | 1000 | Base wait between GetRecords calls per shard, in ms (floored at 200). |
records_per_request | integer | 1000 | GetRecords Limit per request (1–1000). Default 1000. |
shard_concurrency | integer | 4 | Shards read concurrently. Default 4. |
idle_termination_secs | integer | — | Streams: stop after this many seconds without a new record. At least one of idle_termination_secs / max_messages is required in streams mode. |
max_messages | integer | — | Streams: stop after this many change records. |
retry | object | max_retries: 8initial_backoff_ms: 100max_backoff_ms: 10000 | Throttle / transient-failure retry policy. |
batch_size | integer | 1000 | Records per emitted page. 0 is the "no batching" sentinel. Default 1000. |
value_format | object | plain | How attribute values appear in records: plain JSON (default; sets become arrays, binaries base64 strings, imprecise numbers decimal strings) or typed DynamoDB attribute JSON ({"S": "a"}, {"SS": ["x"]}, {"B": "<base64>"}) that a value_format: typed DynamoDB sink writes back losslessly. Applies to scan/query items and to Streams key / before / after images. |
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