{"record":{"id":"0a3823e3f4199332","repo":"risingwavelabs/risingwave","slug":"table-is-not-active","errorCode":null,"errorMessage":"table {} is not active","messagePattern":"table (.+?) is not active","errorType":"validation","errorClass":"SinkError::DynamoDb","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/dynamodb.rs","lineNumber":179,"sourceCode":"        let client = (self.config.build_client().await)\n            .context(\"validate DynamoDB sink error\")\n            .map_err(SinkError::DynamoDb)?;\n\n        let table_name = &self.config.table;\n        let output = client\n            .describe_table()\n            .table_name(table_name)\n            .send()\n            .await\n            .map_err(|e| anyhow!(e))?;\n        let Some(table) = output.table else {\n            return Err(SinkError::DynamoDb(anyhow!(\n                \"table {} not found\",\n                table_name\n            )));\n        };\n        if !matches!(table.table_status(), Some(TableStatus::Active)) {\n            return Err(SinkError::DynamoDb(anyhow!(\n                \"table {} is not active\",\n                table_name\n            )));\n        }\n        let rw_pk_names = rw_pk_names(&self.schema, &self.pk_indices)?;\n        let dynamodb_keys = dynamodb_key_schema_names(table_name, table.key_schema())?;\n        validate_pk_matches_dynamodb_key_schema(table_name, &rw_pk_names, &dynamodb_keys)?;\n\n        Ok(())\n    }\n\n    async fn new_log_sinker(&self, _writer_param: SinkWriterParam) -> Result<Self::LogSinker> {\n        Ok(\n            DynamoDbSinkWriter::new(self.config.clone(), self.schema.clone())\n                .await?\n                .into_log_sinker(self.config.max_future_send_nums),\n        )\n    }","sourceCodeStart":161,"sourceCodeEnd":197,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/dynamodb.rs#L161-L197","documentation":"After DescribeTable succeeds during sink validation, the connector checks that the table's status is ACTIVE. DynamoDB tables that are CREATING, UPDATING, or DELETING are not ready to receive writes, so validation fails with this message.","triggerScenarios":"CREATE SINK issued while the target DynamoDB table is still being created (status CREATING) or is mid-update/deletion; also occurs right after running create-table and immediately creating the sink.","commonSituations":"Infrastructure-as-code scripts that create the table and the RisingWave sink back-to-back without waiting for ACTIVE status; table undergoing GSI changes; table being deleted concurrently.","solutions":["Wait until `aws dynamodb describe-table --table-name <name>` reports TableStatus ACTIVE, then retry CREATE SINK.","Re-run the CREATE SINK statement once the table update/deletion operation completes.","Add a wait in deployment scripts (e.g. `aws dynamodb wait table-exists` plus status check).","Verify no other process is updating or deleting the table concurrently."],"exampleFix":"// before: create-table then immediately CREATE SINK (table still CREATING)\n// after:\naws dynamodb wait table-exists --table-name events\naws dynamodb describe-table --table-name events  # confirm ACTIVE\nCREATE SINK s FROM mv WITH (connector='dynamodb', table='events');","handlingStrategy":"retry","validationCode":"aws dynamodb describe-table --table-name events --query 'Table.TableStatus'  # expect \"ACTIVE\"","typeGuard":null,"tryCatchPattern":"// retry CREATE SINK after the table reaches ACTIVE status, with backoff\nfor (let attempt = 0; attempt < 5; attempt++) {\n  if (await tableStatusIs('events', 'ACTIVE')) { await createSink(); break; }\n  await sleep(backoff(attempt));\n}","preventionTips":["Use `aws dynamodb wait table-exists` before creating the sink.","Sequence IaC so table mutations finish before sink (re)creation.","Check TableStatus in pre-deploy health checks."],"tags":["aws","dynamodb","sink","state","validation"],"backgroundTag":"invalid-state-transition","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"}