Show events from an S3 bucket
Many systems keep a copy of their events as files in an S3 bucket.
The streamview serve command reads these files. It puts each event at the time that the record gives.
You need the AWS command line (aws), with access to the bucket.
The files must have JSON records: one on each line, or one directly after the other. A file can be a gzip file.
streamview does not connect to S3. The aws command reads the objects, and streamview reads its output.
Look at one object
Section titled “Look at one object”- Find the fields of a record. Print the first record of an object:
aws s3 cp s3://my-bucket/events/orders-partition-0.json.gz - | gunzip | head -n 1{"eventType": "order.placed", "occurredAt": "2026-12-01T10:00:00.064767Z", "orderId": "ord_0", "total": 43, "country": "IE"}- Find these three fields in the record:
- The field that gives the kind of event. In the example:
eventType. - The field that gives the time. In the example:
occurredAt. - The field that connects the events of one order. In the example:
orderId.
- Send the object to streamview, with the names of the three fields:
aws s3 cp s3://my-bucket/events/orders-partition-0.json.gz - | streamview serve - \ --db archive.db --type-field eventType --time-field occurredAt \ --correlation-field orderId --sort --openThe browser opens. When the command reaches the end of the object, the page shows the events at their times. The terminal shows a line such as this:
-: end of input, 588 events accepted, 0 rejectedUse --db with a new file name. Do not load an archive into a store that has newer events.
See Time and sequence of events for the reason.
Load all objects below a prefix
Section titled “Load all objects below a prefix”- Copy the objects to a directory:
aws s3 sync s3://my-bucket/events/ archive- Send all files to streamview:
cat archive/* | streamview serve - \ --db archive.db --type-field eventType --time-field occurredAt \ --correlation-field orderId --sort --openThe files can be gzip files or text files, but not the two kinds together.
--sort is necessary here. Each file has its own time range, and the ranges of two files are frequently the same.
With --sort, streamview holds all events until the end of the input, and then puts them in time sequence.
If a record does not give the kind of event
Section titled “If a record does not give the kind of event”Give one type to all records with --type:
cat archive/* | streamview serve - --db archive.db --type payment --time-field ts --sort --openIf you give no type option, streamview looks at the usual field names, for example type, event, and detail-type.
See Events from plain JSON records.
If a record does not give the time
Section titled “If a record does not give the time”streamview then uses the time when it read the record. All records are at one point on the timeline.
Look for a time field one level down, and give its path with periods. For example: --time-field metadata.timestamp.
The time can be text, such as 2026-12-01T10:00:00Z, or a number of seconds or milliseconds from 1970.
Read the archive again
Section titled “Read the archive again”Run the same command again with the same --db file. streamview does not add the records a second time.
To start from zero, delete the --db file.
Use a different object store
Section titled “Use a different object store”The steps are the same for each store that has a command that prints an object.
We tested these steps with MinIO, which is an S3-compatible store, and with the aws command.