Skip to main content
Basins and streams each have configuration that can be set at creation time and modified later via reconfigure (streams, basins). The most important choices are:
  • Storage class β€” standard or express. This controls append latency, not durability β€” both classes are regionally durable. See Architecture: Storage classes.
  • Retention β€” how long records stick around. Defaults to 7 days. See Retention + Trimming.
  • Auto-creation β€” whether streams are created implicitly on first append or read, useful when you have many short-lived or dynamic streams.
You can view and edit configs from the CLI:
# view current config
s2 get-stream-config s2://my-basin/my-stream

# reconfigure stream
s2 reconfigure-stream s2://my-basin/my-stream --storage-class express
…or from the dashboard: Stream config in the S2 dashboard

Stream config

For the full set of fields, see the create and reconfigure API docs, or the docs for the SDK you are using. A summary:
FieldDefaultDescription
storage_classstandardstandard or express. Stream storage class affects initial acknowledgement latency only, not durability.
retention_policy7 daysAge-based (in seconds) or infinite.
delete_on_emptyDisabledAuto-delete empty streams after a minimum age.
timestamping.modeclient-preferHow timestamps should be assigned: by S2 on arrival; from the client, if provided, if client-prefer; or always from the client, with client-require.
timestamping.uncappedfalseAllow client timestamps to exceed arrival time into S2.

Delete on empty

When enabled, a stream is automatically deleted once all its records have been trimmed and the stream is empty. The min_age_secs field requires the stream to have existed for at least that long before it can be auto-deleted. Useful for ephemeral streams β€” e.g. one stream per job run where the data is consumed and no longer needed.

Basin config

FieldDefaultDescription
create_stream_on_appendfalseAuto-create streams on first append.
create_stream_on_readfalseAuto-create streams on first read.
default_stream_configSee aboveConfig applied to auto-created streams.