Amazon Keyspaces

A fully managed Apache Cassandra-compatible database that provides serverless scalability and availability while using CQL (Cassandra Query Language) as-is

Overview

Amazon Keyspaces (for Apache Cassandra) is a fully managed database service that provides an Apache Cassandra-compatible CQL API. You can use existing Cassandra drivers and tools as-is, freeing you from Cassandra cluster operations (node management, patching, backups, scaling). Storage is automatically replicated across three Availability Zones, delivering a 99.999% availability SLA. Two billing models are available: on-demand capacity mode and provisioned capacity mode.

Cassandra Compatibility and Its Boundaries

Keyspaces supports the majority of CQL (Cassandra Query Language), but not every Cassandra feature is available. Supported features include table CRUD operations, TTL (Time to Live), static columns, counters, user-defined types (UDTs), lightweight transactions (LWT), and logged and unlogged batches. Unsupported features include secondary indexes (CREATE INDEX), materialized views, user-defined functions (UDFs), user-defined aggregates (UDAs), triggers, and TRUNCATE. Before migration, run your existing schema and queries against Keyspaces using cqlsh to verify compatibility. Options for migrating data from Cassandra include loading with cqlsh or DSBulk, offline migration with AWS Glue, and near-real-time replication with CQLReplicator. During migration, a dual-write approach that writes to both the source Cassandra cluster and Keyspaces minimizes downtime. Keyspaces is compatible with the CQL 3.11 API and backward-compatible with version 2.x (as of October 2026). If you depend on features specific to newer versions, verify support status before deciding on adoption.

Selection Criteria vs. DynamoDB

Keyspaces and DynamoDB are both fully managed NoSQL databases, but they differ in data modeling and query flexibility. DynamoDB supports key-value and document data models and requires designing access patterns around partition keys and sort keys upfront. GSIs (Global Secondary Indexes) accommodate additional access patterns, but each index incurs additional cost. Keyspaces is a wide-column store with flexible data modeling through partition keys and clustering columns. CQL offers range queries, IN clauses, ORDER BY, and more (IN is limited to SELECT statements, and when IN is combined with ORDER BY, results are ordered within a page). As a selection guide: DynamoDB is suited to new projects designed AWS-native; for migrating existing Cassandra workloads, Keyspaces is appropriate. DynamoDB offers integration with the AWS ecosystem (Streams, DAX, Global Tables, PartiQL) and connects with Lambda triggers and EventBridge Pipes. Keyspaces is characterized by Cassandra ecosystem compatibility (drivers, ORMs, tools), making it an option when prioritizing portability in multi-cloud or hybrid environments.

Capacity Mode Selection and Cost Optimization

Keyspaces offers two capacity modes similar to DynamoDB: on-demand and provisioned. On-demand mode is fully pay-per-request, suited for workloads with unpredictable traffic patterns and development environments. Provisioned mode pre-sets read/write capacity units. With Auto Scaling enabled, capacity automatically adjusts to traffic fluctuations. For cost optimization, TTL deletes expired data automatically. Setting TTL on data that becomes unnecessary after a certain period - such as log data and session data - controls storage cost growth. With point-in-time recovery (PITR) enabled, you can restore a table to any second since PITR was enabled, within the last 35 days. Encryption at rest offers two key choices: the default AWS owned key (no additional charge) and a customer managed key in AWS KMS, selected based on compliance requirements.

References (Official AWS Resources)

The primary sources for this page are the official AWS website and documentation. Check the official pages below for the latest specifications and pricing.

If this page and the official documentation disagree, treat the official documentation as authoritative.

Share