{"record":{"id":"50bdfcb682fb5c3e","repo":"risingwavelabs/risingwave","slug":"s3-endpoint-and-s3-region-need-to-be-filled-with-a","errorCode":null,"errorMessage":"s3.endpoint and s3.region need to be filled with at least one","messagePattern":"s3\\.endpoint and s3\\.region need to be filled with at least one","errorType":"validation","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/deltalake.rs","lineNumber":170,"sourceCode":"                    \"s3.access.key and s3.secret.key is required with aws s3\"\n                ))\n            })?\n            .as_ref()\n            .provide_credentials()\n            .await\n            .map_err(|e| SinkError::Config(e.into()))?;\n        let region = sdk_config.region();\n        let endpoint = sdk_config.endpoint_url();\n        storage_options.insert(\n            AWS_ACCESS_KEY_ID.to_owned(),\n            credentials.access_key_id().to_owned(),\n        );\n        storage_options.insert(\n            AWS_SECRET_ACCESS_KEY.to_owned(),\n            credentials.secret_access_key().to_owned(),\n        );\n        if endpoint.is_none() && region.is_none() {\n            return Err(SinkError::Config(anyhow!(\n                \"s3.endpoint and s3.region need to be filled with at least one\"\n            )));\n        }\n        storage_options.insert(\n            AWS_REGION.to_owned(),\n            region\n                .map(|r| r.as_ref().to_owned())\n                .unwrap_or_else(|| DEFAULT_REGION.to_owned()),\n        );\n        if let Some(s3_endpoint) = endpoint {\n            storage_options.insert(AWS_ENDPOINT_URL.to_owned(), s3_endpoint.to_owned());\n        }\n        Ok(storage_options)\n    }\n}\n\nenum DeltaTableUrl {\n    S3(String),","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/deltalake.rs#L152-L188","documentation":"After credential resolution, the AWS deltalake config builder requires that at least one of `s3.endpoint` or `s3.region` is set. Without either, the S3 object store location cannot be resolved, so the configuration is rejected with a Config error.","triggerScenarios":"`build_delta_lake_config_for_aws` finds `endpoint.is_none() && region.is_none()` when creating a DeltaLake sink against S3, i.e. neither `s3.endpoint` nor `s3.region` appears in the WITH options.","commonSituations":"Users forget `s3.region` for real AWS S3; users forget `s3.endpoint` for MinIO/other S3-compatible stores; region supplied under a misspelled option name.","solutions":["Set `s3.region` (e.g. 'us-east-1') for real AWS S3","Set `s3.endpoint` (e.g. 'http://minio:9000') for S3-compatible storage","Setting both is allowed and often needed for S3-compatible stores","Double-check the option key spelling in the WITH clause"],"exampleFix":"// before\nWITH ( connector='deltalake', location='s3://bucket/t', s3.access.key='k', s3.secret.key='s' )\n// after\nWITH ( connector='deltalake', location='s3://bucket/t', s3.access.key='k', s3.secret.key='s', s3.region='us-east-1' )","handlingStrategy":"validation","validationCode":"fn validate_s3_location(props: &BTreeMap<String, String>) -> Result<(), String> {\n    let has_endpoint = props.get(\"s3.endpoint\").map_or(false, |v| !v.is_empty());\n    let has_region = props.get(\"s3.region\").map_or(false, |v| !v.is_empty());\n    if !has_endpoint && !has_region {\n        return Err(\"set s3.region (AWS) or s3.endpoint (S3-compatible)\".into());\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["For AWS S3 always set s3.region; for MinIO/others always set s3.endpoint","Setting both endpoint and region is safest for S3-compatible stores","Lint your sink DDL templates to require region/endpoint fields"],"tags":["aws","s3","deltalake","config"],"backgroundTag":"missing-required-config-field","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}