risingwavelabs/risingwave · error · SinkError

Kinesis error: {0}

Error message

Kinesis error: {0}

What it means

Variant of `SinkError` representing failures from the Kinesis connector. Because the AWS SDK error is boxed as `anyhow::Error` with `#[source]` and `#[backtrace]`, it renders as 'Kinesis error: <cause>' and preserves the underlying AWS error chain.

Source

Thrown at src/connector/src/sink/mod.rs:1092

        $(
            impl From<$sink_type> for SinkImpl {
                fn from(sink: $sink_type) -> SinkImpl {
                    SinkImpl::$variant_name(Box::new(sink))
                }
            }
        )*
    };
}

def_sink_impl!();

pub type Result<T> = std::result::Result<T, SinkError>;

#[derive(Error, Debug)]
pub enum SinkError {
    #[error("Kafka error: {0}")]
    Kafka(#[from] rdkafka::error::KafkaError),
    #[error("Kinesis error: {0}")]
    Kinesis(
        #[source]
        #[backtrace]
        anyhow::Error,
    ),
    #[error("Remote sink error: {0}")]
    Remote(
        #[source]
        #[backtrace]
        anyhow::Error,
    ),
    #[error("Encode error: {0}")]
    Encode(String),
    #[error("Avro error: {0}")]
    Avro(#[from] apache_avro::Error),
    #[error("Iceberg error: {0}")]
    Iceberg(
        #[source]

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Inspect the inner AWS SDK error and fix auth: set valid credentials (IAM role, env vars) via the configured credential chain
  2. Verify region and stream name in the sink WITH options match the actual Kinesis stream
  3. Handle throttling by increasing shards or retrying with backoff; RisingWave sink retries may need commit_checkpoint_interval/decouple tuning
Defensive patterns

Strategy: retry

Validate before calling

// pre-check credentials and stream before creating the sink
aws kinesis describe-stream --stream-name <name> --region <region> || echo "stream/credentials issue"

Try / catch

match err {
    SinkError::Kinesis(e) if e.to_string().contains("ThrottlingException") => {
        tokio::time::sleep(backoff).await; // retry with exponential backoff
    }
    SinkError::Kinesis(e) => return Err(e.into()), // auth/stream-name errors: fail fast
    e => return Err(e.into()),
}

Prevention

When it happens

Trigger: Kinesis sink/connector operations fail: PutRecords throttling, stream not found, credential retrieval failure, network errors returned by the AWS SDK and wrapped into SinkError::Kinesis.

Common situations: Missing or expired AWS credentials (no IMDS role, wrong profile); stream name typo or stream in another region; provisioned throughput exceeded (throttled PutRecords).

Understand the failure class

Background: "API error: {status}" and "HTTP 401/403/404/429/5xx" errors: non-2xx HTTP responses explained — this error's family across 27 libraries.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/c1b3e9772d55444c. Report an issue: GitHub.