risingwavelabs/risingwave · error · SinkError::Config
S3 configuration is required for S3 sink
Error message
S3 configuration is required for S3 sink
What it means
`SnowflakeRedshiftSinkWriter::new` builds an S3-backed writer when `config.with_s3` is true; the concrete S3 connection config (`s3_inner`) must have been parsed earlier. If `with_s3` is set but `s3_inner` is None, this SinkError::Config is thrown because the writer cannot reach S3.
Source
Thrown at src/connector/src/sink/snowflake_redshift/redshift.rs:316
}
pub enum RedShiftSinkWriter {
S3(SnowflakeRedshiftSinkS3Writer),
Jdbc(SnowflakeRedshiftSinkJdbcWriter),
}
impl RedShiftSinkWriter {
pub async fn new(
config: RedShiftConfig,
is_append_only: bool,
writer_param: super::SinkWriterParam,
mut param: SinkParam,
) -> Result<Self> {
let schema = param.schema();
if config.with_s3 {
let s3_writer = SnowflakeRedshiftSinkS3Writer::new(
config.s3_inner.ok_or_else(|| {
SinkError::Config(anyhow!("S3 configuration is required for S3 sink"))
})?,
schema,
is_append_only,
config.table,
)?;
Ok(Self::S3(s3_writer))
} else {
let (writer_schema, writer_table) = if is_append_only {
(config.schema.clone(), config.table.clone())
} else {
(
config.intermediate_schema.clone().or(config.schema.clone()),
config.cdc_table.clone().ok_or_else(|| {
SinkError::Config(anyhow!(
"intermediate.table.name is required for non-append-only sink"
))
})?,
)View on GitHub (pinned to 6469eb736d)
Solutions
- Provide the required S3 properties (bucket, endpoint, access/secret key) in the sink WITH clause
- Create and reference an S3 CONNECTION object in RisingWave so s3_inner gets populated
- If S3 is not needed, remove the s3 flag so with_s3 is false
Example fix
// before WITH ( connector = 'snowflake', s3_stage = 'true' ) -- after WITH ( connector = 'snowflake', s3_stage = 'true', s3.bucket = 'my-bucket', s3.access_key = '...', s3.secret_key = '...' )
Defensive patterns
Strategy: validation
Validate before calling
// before enabling s3 staging
if props.get("s3_stage").map(|v| v == "true").unwrap_or(false)
&& !(props.contains_key("s3.bucket") && props.contains_key("s3.access_key")) {
return Err("S3 connection properties required when s3 staging is enabled");
} Prevention
- Provide full S3 settings whenever s3 staging is enabled
- Prefer a named S3 CONNECTION object to keep credentials centralized
- Test sink creation with `CREATE SINK ... ` in a dev environment first
When it happens
Trigger: Setting the s3-related flag/property so `with_s3 == true` without providing the s3 connection settings (endpoint/bucket/credentials) that populate `config.s3_inner`.
Common situations: Users enabling S3 staging for Snowflake/Redshift sinks but omitting s3.access/s3.secret or the s3 connection name; a connector version change that reparses properties into s3_inner.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Time went backwards
- SinkError::Config(anyhow!(e))
- intermediate.table.name is required for append-only sink
- Primary key columns not found. Please set the `primary_key`
- intermediate.table.name is required for non-append-only sink
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/d60b037445ed3ee8.
Report an issue: GitHub.