Amazon Keyspaces (for Apache Cassandra) Diagnostics
When to use
Any Amazon Keyspaces investigation where the console alone is insufficient — table creation failures, schema issues, CQL compatibility, read/write throttling, hot partitions, connectivity problems, TLS/SigV4 authentication, capacity planning, TTL behavior, PITR backup/restore, or Cassandra migration.
Investigation workflow
Step 1 — Collect and triage
aws keyspaces list-keyspaces
aws keyspaces get-keyspace --keyspace-name <keyspace>
aws keyspaces list-tables --keyspace-name <keyspace>
aws keyspaces get-table --keyspace-name <keyspace> --table-name <table>
aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name PerConnectionRequestRateExceeded --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum
Step 2 — Domain deep dive
aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name ReadThrottleEvents --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum
aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name WriteThrottleEvents --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum
aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name SuccessfulRequestLatency --dimensions Name=TableName,Value=<table> Name=Operation,Value=SELECT --start-time <start> --end-time <end> --period 300 --statistics Average
aws application-autoscaling describe-scalable-targets --service-namespace cassandra --resource-ids keyspace/<keyspace>/table/<table>
aws keyspaces get-table --keyspace-name <keyspace> --table-name <table> --query '{CapacityMode:CapacitySpecification,TTL:Ttl,PITR:PointInTimeRecovery}'
Step 3 — Detailed investigation
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventSource,AttributeValue=cassandra.amazonaws.com --max-results 20
aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name SystemErrors --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum
aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name ConsumedReadCapacityUnits --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum
aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name ConsumedWriteCapacityUnits --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum
Read references/keyspaces-guardrails.md before concluding on any Keyspaces issue.
Tool quick reference
| Tool / API |
When to use |
get-keyspace |
Check keyspace existence and configuration |
get-table |
Check table schema, capacity mode, TTL, PITR status |
list-tables |
List all tables in a keyspace |
create-table |
Create a new table (verify schema first) |
update-table |
Modify capacity mode, TTL, or PITR settings |
restore-table |
Restore table from PITR |
tag-resource |
Manage table tags |
CloudWatch AWS/Cassandra |
Read/write throttling, latency, errors, capacity |
application-autoscaling |
Check/configure auto-scaling for provisioned tables |
cqlsh with SigV4 |
Execute CQL queries for data-level troubleshooting |
Gotchas: Amazon Keyspaces
- Keyspaces is NOT Apache Cassandra. It is a serverless, CQL-compatible service with a different underlying engine. Many Cassandra-native features are unavailable. Do not assume Cassandra documentation applies directly.
- No ALLOW FILTERING by default. Queries must use partition key. Full table scans via ALLOW FILTERING are not supported in the same way as open-source Cassandra. Queries must be designed around partition keys.
- No lightweight transactions (LWT) in some versions. Conditional writes (IF NOT EXISTS, IF conditions) have limited support. Check current documentation for LWT availability in your region.
- Partition key design is critical — same principles as DynamoDB. Hot partitions cause throttling. Distribute writes evenly across partition keys. Single hot partition can throttle the entire table.
- TLS is required for all connections. Keyspaces does not accept unencrypted connections. Port 9142 with TLS. The Starfield digital certificate must be trusted by the client.
- SigV4 or service-specific credentials for authentication. IAM-based SigV4 authentication is recommended. Service-specific credentials (username/password) are an alternative generated via IAM console. No native Cassandra authentication.
- No UDFs, UDAs, or materialized views. User-defined functions, user-defined aggregates, and materialized views are not supported. Use application-side logic or secondary indexes instead.
- TTL maximum is 630,720,000 seconds (20 years). TTL values exceeding this are rejected. TTL is set per-row, not per-table. Expired data is deleted asynchronously and may be visible briefly after expiration.
- PITR provides continuous backup. Point-in-time recovery is always-on continuous backup with 35-day retention. Restores create a new table. No manual snapshots like Cassandra nodetool.
- No multi-region tables natively. Use application-level replication patterns. Keyspaces does not support Cassandra-style multi-datacenter replication. Each table exists in a single region.
Anti-hallucination rules
- Always cite specific table names, keyspace names, or API responses as evidence.
- Keyspaces is NOT Cassandra. Never suggest Cassandra-specific tools (nodetool, cassandra-stress) or features (materialized views, UDFs).
- TLS is mandatory. Never suggest connecting without TLS or on port 9042.
- Partition key design drives performance. Never ignore partition key analysis for throttling issues.
- CQL compatibility is partial. Never assume all CQL features work. Verify against Keyspaces documentation.
- Spend no more than 2 minutes on any single hypothesis. Pivot if inconclusive.
22 runbooks
| Category |
IDs |
Covers |
| A — Table |
A1-A3 |
Creation failures, schema issues, capacity mode |
| B — Performance |
B1-B3 |
Read/write throttling, hot partitions, query performance |
| C — CQL |
C1-C2 |
CQL compatibility, unsupported features |
| D — Connectivity |
D1-D2 |
Connection failures, TLS/SigV4 auth |
| E — Capacity |
E1-E2 |
On-demand vs provisioned, auto-scaling |
| F — TTL |
F1-F2 |
TTL configuration, expiration behavior |
| G — Backup |
G1-G2 |
PITR, snapshot restore |
| H — Migration |
H1-H2 |
Cassandra migration, CQLReplicator |
| Z — Catch-All |
Z1 |
General troubleshooting |
1---2name: keyspaces-diagnostics3description: Use this skill to investigate and troubleshoot Amazon Keyspaces (for Apache Cassandra) problems by analyzing table creation, schema management, CQL compatibility, read/write performance, connectivity, capacity modes, TTL behavior, backup/restore, migration, and following structured runbooks. Activate when: table creation failures, schema modification errors, capacity mode issues, read/write throttling, hot partitions, query performance degradation, CQL compatibility problems, unsupported Cassandra features, connection failures, TLS/SigV4 authentication errors, on-demand vs provisioned confusion, auto-scaling misconfiguration, TTL not expiring, TTL configuration errors, PITR restore failures, snapshot issues, Cassandra migration problems, CQLReplicator errors, or the user says something is wrong with Amazon Keyspaces without naming specific symptoms.4---56# Amazon Keyspaces (for Apache Cassandra) Diagnostics78## When to use910Any Amazon Keyspaces investigation where the console alone is insufficient — table creation failures, schema issues, CQL compatibility, read/write throttling, hot partitions, connectivity problems, TLS/SigV4 authentication, capacity planning, TTL behavior, PITR backup/restore, or Cassandra migration.1112## Investigation workflow1314### Step 1 — Collect and triage1516```17aws keyspaces list-keyspaces18aws keyspaces get-keyspace --keyspace-name <keyspace>19aws keyspaces list-tables --keyspace-name <keyspace>20aws keyspaces get-table --keyspace-name <keyspace> --table-name <table>21aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name PerConnectionRequestRateExceeded --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum22```2324### Step 2 — Domain deep dive2526```27aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name ReadThrottleEvents --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum28aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name WriteThrottleEvents --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum29aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name SuccessfulRequestLatency --dimensions Name=TableName,Value=<table> Name=Operation,Value=SELECT --start-time <start> --end-time <end> --period 300 --statistics Average30aws application-autoscaling describe-scalable-targets --service-namespace cassandra --resource-ids keyspace/<keyspace>/table/<table>31aws keyspaces get-table --keyspace-name <keyspace> --table-name <table> --query '{CapacityMode:CapacitySpecification,TTL:Ttl,PITR:PointInTimeRecovery}'32```3334### Step 3 — Detailed investigation3536```37aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventSource,AttributeValue=cassandra.amazonaws.com --max-results 2038aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name SystemErrors --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum39aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name ConsumedReadCapacityUnits --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum40aws cloudwatch get-metric-statistics --namespace AWS/Cassandra --metric-name ConsumedWriteCapacityUnits --dimensions Name=TableName,Value=<table> --start-time <start> --end-time <end> --period 300 --statistics Sum41```4243Read `references/keyspaces-guardrails.md` before concluding on any Keyspaces issue.4445## Tool quick reference4647| Tool / API | When to use |48|------------|-------------|49| `get-keyspace` | Check keyspace existence and configuration |50| `get-table` | Check table schema, capacity mode, TTL, PITR status |51| `list-tables` | List all tables in a keyspace |52| `create-table` | Create a new table (verify schema first) |53| `update-table` | Modify capacity mode, TTL, or PITR settings |54| `restore-table` | Restore table from PITR |55| `tag-resource` | Manage table tags |56| CloudWatch `AWS/Cassandra` | Read/write throttling, latency, errors, capacity |57| `application-autoscaling` | Check/configure auto-scaling for provisioned tables |58| `cqlsh` with SigV4 | Execute CQL queries for data-level troubleshooting |5960## Gotchas: Amazon Keyspaces6162- Keyspaces is NOT Apache Cassandra. It is a serverless, CQL-compatible service with a different underlying engine. Many Cassandra-native features are unavailable. Do not assume Cassandra documentation applies directly.63- No ALLOW FILTERING by default. Queries must use partition key. Full table scans via ALLOW FILTERING are not supported in the same way as open-source Cassandra. Queries must be designed around partition keys.64- No lightweight transactions (LWT) in some versions. Conditional writes (IF NOT EXISTS, IF conditions) have limited support. Check current documentation for LWT availability in your region.65- Partition key design is critical — same principles as DynamoDB. Hot partitions cause throttling. Distribute writes evenly across partition keys. Single hot partition can throttle the entire table.66- TLS is required for all connections. Keyspaces does not accept unencrypted connections. Port 9142 with TLS. The Starfield digital certificate must be trusted by the client.67- SigV4 or service-specific credentials for authentication. IAM-based SigV4 authentication is recommended. Service-specific credentials (username/password) are an alternative generated via IAM console. No native Cassandra authentication.68- No UDFs, UDAs, or materialized views. User-defined functions, user-defined aggregates, and materialized views are not supported. Use application-side logic or secondary indexes instead.69- TTL maximum is 630,720,000 seconds (20 years). TTL values exceeding this are rejected. TTL is set per-row, not per-table. Expired data is deleted asynchronously and may be visible briefly after expiration.70- PITR provides continuous backup. Point-in-time recovery is always-on continuous backup with 35-day retention. Restores create a new table. No manual snapshots like Cassandra nodetool.71- No multi-region tables natively. Use application-level replication patterns. Keyspaces does not support Cassandra-style multi-datacenter replication. Each table exists in a single region.7273## Anti-hallucination rules74751. Always cite specific table names, keyspace names, or API responses as evidence.762. Keyspaces is NOT Cassandra. Never suggest Cassandra-specific tools (nodetool, cassandra-stress) or features (materialized views, UDFs).773. TLS is mandatory. Never suggest connecting without TLS or on port 9042.784. Partition key design drives performance. Never ignore partition key analysis for throttling issues.795. CQL compatibility is partial. Never assume all CQL features work. Verify against Keyspaces documentation.806. Spend no more than 2 minutes on any single hypothesis. Pivot if inconclusive.8182## 22 runbooks8384| Category | IDs | Covers |85|----------|-----|--------|86| A — Table | A1-A3 | Creation failures, schema issues, capacity mode |87| B — Performance | B1-B3 | Read/write throttling, hot partitions, query performance |88| C — CQL | C1-C2 | CQL compatibility, unsupported features |89| D — Connectivity | D1-D2 | Connection failures, TLS/SigV4 auth |90| E — Capacity | E1-E2 | On-demand vs provisioned, auto-scaling |91| F — TTL | F1-F2 | TTL configuration, expiration behavior |92| G — Backup | G1-G2 | PITR, snapshot restore |93| H — Migration | H1-H2 | Cassandra migration, CQLReplicator |94| Z — Catch-All | Z1 | General troubleshooting |