beekeeper-studio/beekeeper-studio · info

DynamoDB does not support creating databases

Error message

DynamoDB does not support creating databases

What it means

DynamoDBClient.createDatabase() is a stub that always throws. DynamoDB is a managed NoSQL service with no concept of user-created database/catalog objects, so the operation is unsupported by design. Any UI or script path that triggers database creation against a DynamoDB connection hits this error.

Source

Thrown at apps/studio/src-commercial/backend/lib/db/clients/dynamodb.ts:867

    }

    // Each UpdateTable call can only process one GSI change, so iterate.
    for (const update of updates) {
      await this.raw.send(new UpdateTableCommand({
        TableName: changes.table,
        AttributeDefinitions: Array.from(existingAttrs.values()),
        GlobalSecondaryIndexUpdates: [update],
      }));
    }
  }

  // -------------------- unsupported operations ---------------------
  getBuilder(table: string, schema?: string): ChangeBuilderBase {
    return new DynamoDBChangeBuilder(table, schema);
  }

  async createDatabase(): Promise<string> {
    throw new Error('DynamoDB does not support creating databases');
  }

  async createDatabaseSQL(): Promise<string> {
    throw new Error('DynamoDB does not support generating SQL');
  }

  async getTableCreateScript(): Promise<string> {
    throw new Error('DynamoDB does not expose CREATE TABLE SQL');
  }

  async getViewCreateScript(): Promise<string[]> {
    throw new Error('DynamoDB does not support views');
  }

  async getMaterializedViewCreateScript(): Promise<string[]> {
    throw new Error('DynamoDB does not support materialized views');
  }

View on GitHub (pinned to 4e3e03e322)

Solutions

  1. Do not create databases on DynamoDB — create tables (or use separate AWS accounts/regions for logical separation) instead
  2. Guard the UI action: hide 'Create Database' for dynamodb connection types
  3. Catch the error and surface a clear 'unsupported for DynamoDB' message

Example fix

// before
await client.createDatabase('mydb');
// after
if (client.connectionType === 'dynamodb') {
  throw new UnsupportedOperationNotice('DynamoDB: create tables instead of databases');
}
await client.createDatabase('mydb');
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTS_CREATE_DB = !['dynamodb'].includes(connectionType);
if (!SUPPORTS_CREATE_DB) throw new SkipAction('create-database unsupported for ' + connectionType);

Type guard

function isDynamoDBClient(c: any): c is DynamoDBClient {
  return c?.connectionType === 'dynamodb' || c instanceof DynamoDBClient;
}

Try / catch

try {
  await client.createDatabase(name);
} catch (e) {
  if (String(e.message).includes('DynamoDB does not support')) {
    notifyUser('DynamoDB has no database concept; create tables instead.');
    return;
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling DynamoDBClient.createDatabase(), or using Beekeeper Studio's 'Create Database' action while connected to a DynamoDB data source.

Common situations: User right-clicks the connection in the sidebar and picks 'Create Database'; automation scripts reusing a generic DB client interface across connection types.

Related errors


AI-assisted analysis of beekeeper-studio/beekeeper-studio@4e3e03e322 (2026-08-31). Data as JSON: /api/errors/abfb7139fa003e13. Report an issue: GitHub.