{"record":{"id":"0d7d64e2a0b337a4","repo":"quickwit-oss/quickwit","slug":"kinesis-region-or-endpoint-cannot-be-updated","errorCode":null,"errorMessage":"Kinesis region or endpoint cannot be updated","messagePattern":"Kinesis region or endpoint cannot be updated","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-config/src/source_config/mod.rs","lineNumber":506,"sourceCode":"pub struct KinesisSourceParams {\n    pub stream_name: String,\n    #[serde(flatten)]\n    pub region_or_endpoint: Option<RegionOrEndpoint>,\n    /// When backfill mode is enabled, the source exits after reaching the end of the stream.\n    #[serde(skip_serializing_if = \"is_false\")]\n    pub enable_backfill_mode: bool,\n}\n\nimpl KinesisSourceParams {\n    fn validate_update(&self, other: &Self) -> anyhow::Result<()> {\n        // Changing the stream would likely mess up the checkpoints because the\n        // Kinesis shard IDs are used as metastore checkpoint PartitionId, and\n        // there uniqueness is only guaranteed within a stream.\n        ensure!(\n            self.stream_name == other.stream_name,\n            \"Kinesis stream_name cannot be updated\"\n        );\n        ensure!(\n            self.region_or_endpoint == other.region_or_endpoint,\n            \"Kinesis region or endpoint cannot be updated\"\n        );\n        Ok(())\n    }\n}\n\n#[derive(Clone, Debug, Eq, PartialEq, Deserialize)]\n#[serde(deny_unknown_fields)]\nstruct KinesisSourceParamsInner {\n    pub stream_name: String,\n    pub region: Option<String>,\n    pub endpoint: Option<String>,\n    #[serde(default)]\n    pub enable_backfill_mode: bool,\n}\n\nimpl TryFrom<KinesisSourceParamsInner> for KinesisSourceParams {","sourceCodeStart":488,"sourceCodeEnd":524,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-config/src/source_config/mod.rs#L488-L524","documentation":"Alongside the stream name, a Kinesis source's `region_or_endpoint` is also immutable across updates: checkpoints keyed by shard IDs assume a single stream, and changing the region/endpoint would silently point at a different stream with colliding shard IDs. `KinesisSourceParams::validate_update` rejects any update that changes this field.","triggerScenarios":"Updating a Kinesis source config where `region_or_endpoint` differs from the stored value (e.g. changing region string or custom endpoint URL), failing validate_update.","commonSituations":"Moving the cluster or index to another AWS region and trying to retarget the source; switching between a localstack/custom endpoint and real AWS; region string format normalized differently between config and stored value.","solutions":["Delete the existing Kinesis source and create a new one with the new region_or_endpoint.","Keep `region_or_endpoint` identical to the stored value and change only mutable params.","If the region changed only in formatting, submit the value exactly as originally configured (same string) to pass the equality check."],"exampleFix":"// before: update with region_or_endpoint: us-east-2 (stored: us-east-1) -> rejected\n\n// after: recreate source\nquickwit source delete --index my-index --source kinesis-src\nquickwit source create --index my-index --source-config kinesis-use2.json","handlingStrategy":"validation","validationCode":"let current = client.get_source(index_id, source_id).await?;\nif current.params.region_or_endpoint != new_params.region_or_endpoint {\n    return Err(\"Kinesis region_or_endpoint is immutable; recreate the source\".into());\n}\nclient.update_source(index_id, source_id, new_params).await?;","typeGuard":null,"tryCatchPattern":"match client.update_source(index_id, source_id, params).await {\n    Err(e) if e.to_string().contains(\"region or endpoint cannot be updated\") => {\n        client.delete_source(index_id, source_id).await?;\n        client.create_source(index_id, source_config_new_region).await?;\n    }\n    other => other?,\n}","preventionTips":["Use the exact same region string format everywhere (avoid mixed 'us-east-1' vs ARN/endpoint forms).","Plan region migrations as new-source creation with checkpoint review.","Compare the full params object against the stored source before issuing updates."],"tags":["kinesis","source","validation","aws-region"],"backgroundTag":"unsupported-operation","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}