risingwavelabs/risingwave · error · SinkError::DynamoDb
table {} not found
Error message
table {} not found What it means
During DynamoDB sink validation, the connector calls DescribeTable on the target table. AWS returned a successful response but the `table` field is None, meaning the named table does not exist in the DynamoDB region/endpoint. The sink refuses to validate because it cannot check the key schema or status of a nonexistent table.
Source
Thrown at src/connector/src/sink/dynamodb.rs:173
crate::impl_validate_sink_unknown_fields!();
async fn validate(&self) -> Result<()> {
risingwave_common::license::Feature::DynamoDbSink
.check_available()
.map_err(|e| anyhow::anyhow!(e))?;
let client = (self.config.build_client().await)
.context("validate DynamoDB sink error")
.map_err(SinkError::DynamoDb)?;
let table_name = &self.config.table;
let output = client
.describe_table()
.table_name(table_name)
.send()
.await
.map_err(|e| anyhow!(e))?;
let Some(table) = output.table else {
return Err(SinkError::DynamoDb(anyhow!(
"table {} not found",
table_name
)));
};
if !matches!(table.table_status(), Some(TableStatus::Active)) {
return Err(SinkError::DynamoDb(anyhow!(
"table {} is not active",
table_name
)));
}
let rw_pk_names = rw_pk_names(&self.schema, &self.pk_indices)?;
let dynamodb_keys = dynamodb_key_schema_names(table_name, table.key_schema())?;
validate_pk_matches_dynamodb_key_schema(table_name, &rw_pk_names, &dynamodb_keys)?;
Ok(())
}
async fn new_log_sinker(&self, _writer_param: SinkWriterParam) -> Result<Self::LogSinker> {View on GitHub (pinned to 6469eb736d)
Solutions
- Create the DynamoDB table first (aws dynamodb create-table) before creating the sink.
- Verify the `table` option spelling exactly matches the DynamoDB table name.
- Confirm the AWS region and credentials used by the sink point at the account/region where the table exists.
- If using a custom endpoint (e.g. dynamodb-local), create the table in that endpoint before validating the sink.
Example fix
// before: sink created before table exists CREATE SINK s FROM mv WITH (connector='dynamodb', table='events'); // after: ensure the table exists first, then create the sink aws dynamodb create-table --table-name events --attribute-definitions AttributeName=pk,AttributeType=S --key-schema AttributeName=pk,KeyType=HASH --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 CREATE SINK s FROM mv WITH (connector='dynamodb', table='events');
Defensive patterns
Strategy: validation
Validate before calling
aws dynamodb describe-table --table-name events --region <region> # must succeed before CREATE SINK
Prevention
- Create the DynamoDB table before declaring the sink.
- Script `aws dynamodb wait table-exists` into deployment pipelines.
- Pin and verify the AWS region in sink config matches where tables are created.
When it happens
Trigger: CREATE SINK ... WITH (connector='dynamodb') where the `table` option names a table that does not exist in the configured AWS region/account, or DescribeTable succeeds against a different endpoint than intended.
Common situations: Typo in the table name, table created in a different AWS region or account than the credentials resolve to, table deleted after creation, or using a local test endpoint (e.g. dynamodb-local) while the table was created elsewhere.
Understand the failure class
Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.
Related errors
- table {} is not active
- table {} key schema is empty
- DynamoDB table {} primary key {:?} must match RisingWave pri
- failed to write items to DynamoDB sink
- No allow_alter_on_fly fields registered for sink: {sink_name
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/88961086238e33ad.
Report an issue: GitHub.