@bijectionhq/app-documents for one table in an AWS commercial region.
The mount publishes observations at the label the installer binds.
The example uses a table whose contents can be disclosed publicly.
Mount and start
bijection/app.ts
inventory.operator and call inventory.source.initialize with:
inventory.documents.list and the source with
inventory.source.health.
Set the AWS session with bijection secret set session.
Grant dynamodb:Scan on the selected table alone. Supply its partition
key, followed by the sort key if the table has one. Both values must be
strings. The combined JSON key is limited to 384 UTF-8 bytes.
The example uses label.public. For protected data, declare a label with
label() and pass it to dynamodbTable and as the app’s data.
The installation charges retained work against the app’s data label’s
reservation. See installer-bound labels.
Paging and recovery
The app uses one strongly consistent Scan item per request and accepts responses up to 36 KiB. It preserves the DynamoDB AttributeValue encoding in each record, including exact number strings. Each page lands with itsLastEvaluatedKey, which the next request uses as ExclusiveStartKey.
After the end of the table, the mount begins another traversal on its
next poll.
A Scan can see writes made between pages. The app makes no snapshot
or deletion-by-absence inference.
An oversize or invalid answer leaves the cursor in place. Use source.health
to get the revision for polling, pausing, resuming, or resetting a source.
A reset starts a new traversal and preserves previously observed items.
Capture DynamoDB Streams changes
Use one Documents mount per stream ARN withdynamodbStreams in place
of dynamodbTable. Use the stream’s AWS region and the installer-bound
label. Grant dynamodb:DescribeStream, dynamodb:GetShardIterator and
dynamodb:GetRecords on the stream ARN. Enable NEW_IMAGE or
NEW_AND_OLD_IMAGES on the table.
source.health before explicitly resetting the
source. Configure a new mount for a replacement stream ARN. Scan and
Streams use separate mounts. Deletion by absence is outside both modes.
DynamoDB Streams shard lineage ·
DynamoDB Streams API ·
Amazon DynamoDB Scan API