Skip to main content
Basins are the top-level organizational unit in S2. Each basin contains streams and has configurable defaults for stream creation.

List basins

List all basins in your account:
Output:

Filter by prefix

Pagination

Limit the number of results:
Start after a specific basin name:
Disable auto-pagination to get a single page:

Using the ls shortcut

The ls command lists basins when no argument is provided:

Create a basin

Create a new basin with default settings:
Output:

Configure basin defaults

Set default stream configuration for auto-created streams:

Enable stream auto-creation

Allow streams to be created automatically on append or read:
With these flags enabled, appending to a non-existent stream will create it with basin defaults instead of returning an error.

Get basin configuration

View the current configuration of a basin:
Output (table format):

Reconfigure a basin

Update an existing basin’s configuration:
Output:
Only the specified fields are updated; other settings remain unchanged.

Available reconfiguration options

  • --create-stream-on-append - Auto-create streams on append (true/false)
  • --create-stream-on-read - Auto-create streams on read (true/false)
  • --storage-class - Default storage class (standard, express)
  • --retention-policy - Default retention (e.g., 7d, 30d, infinite)
  • --timestamping-mode - Timestamping mode (client-prefer, client-require, arrival)
  • --timestamping-uncapped - Allow uncapped timestamps (true/false)
  • --delete-on-empty-min-age - Minimum age before deleting empty streams (e.g., 1d)

Delete a basin

Deleting a basin is irreversible and will delete all streams and records within it.
Delete a basin and all its contents:
Output:
Basin deletion is asynchronous. The basin enters a deleting state and is eventually removed.

Basin states

Basins can be in one of three states:
  • active - Basin is ready for use
  • creating - Basin is being provisioned
  • deleting - Basin is being deleted
Only basins in the active state can be used for stream operations.

Common workflows

Create a production basin with strict settings

Create a development basin with auto-creation

This allows quick prototyping without manually creating streams, and automatically cleans up empty streams after 1 day.

Migration workflow

1

Create new basin

2

Copy stream configurations

3

Migrate data

Configuration reference

Storage classes

  • standard - Cost-optimized storage for most workloads
  • express - Low-latency storage for latency-sensitive workloads

Retention policies

Specify as a duration or infinite:

Timestamping modes

  • client-prefer - Use client timestamp if provided, otherwise server timestamp
  • client-require - Require client timestamp (reject records without one)
  • arrival - Always use server arrival timestamp
See Timestamping for details.

Examples

List basins with production prefix

Create a basin for log aggregation

Reconfigure retention policy