Amazon Keyspaces (for Apache Cassandra)
Cloud service · AWS · Updated

Amazon Keyspaces (for Apache Cassandra)

In short

Amazon Keyspaces (for Apache Cassandra) is a scalable, highly available, and managed Apache Cassandra-compatible database service offered by Amazon Web Services for running Cassandra workloads on AWS without needing to manage the underlying infrastructure.

Cloud Services Hub →

10 key features of Amazon Keyspaces (for Apache Cassandra)

Amazon Keyspaces (for Apache Cassandra) is a scalable, serverless, and fully managed Cassandra-compatible database service that handles automatic scaling, integrates fully with AWS services, and ensures security with encryption at rest and in-transit.

01
Serverless

Amazon Keyspaces operates in a serverless environment, allowing you to scale your database capacity automatically and pay only for the resources you use.

02
Cassandra-compatible

It provides a Cassandra-compatible querying layer, so you can use the same Cassandra application code, Apache 2.0 licensed drivers, and tools with Amazon Keyspaces.

03
Elastically Scalable Throughput

You can scale read and write throughput up or down without downtime or performance degradation, ensuring that your application remains highly available and responsive.

04
Managed Service

As a fully managed service, Amazon Keyspaces handles time-consuming tasks such as provisioning, patching, and backups, freeing you up to focus on building applications.

05
Fully Integrated with AWS Services

It is fully integrated with other AWS services, providing you with a comprehensive and secure managed database service environment.

06
Automatic and Continuous Backups

When enabled, point-in-time recovery automatically backs up table data with per-second granularity and allows recovery to any single second in the preceding 35 days, protecting against accidental writes or deletes.

07
Encryption at Rest and In-Transit

Data is secured with encryption at rest using AWS Key Management Service (KMS) and encryption in-transit with TLS, ensuring data is protected both on disk and over the network.

08
Client-Side Timestamps

Amazon Keyspaces persists Cassandra-compatible client-side timestamps for each cell, supporting conflict resolution and letting client applications determine write ordering.

09
User-Defined Types

User-defined types (UDTs) let applications define data structures that represent real-world data hierarchies.

10
DDL Management APIs and Infrastructure as Code

In addition to CQL requests through Cassandra drivers, Amazon Keyspaces supports DDL operations for managing keyspaces and tables through the AWS SDK, AWS CLI, AWS CloudFormation, and Terraform.

Where Amazon Keyspaces (for Apache Cassandra) is used

Amazon Keyspaces is used for managing time-series data, personalizing content with recommendation engines, managing inventory in real-time, updating gaming leaderboards, processing event logs, and handling user session data efficiently at scale.

  1. 01
    Time-Series Data Management

    Amazon Keyspaces is ideal for handling large volumes of time-series data such as IoT sensor data, application metrics, and telemetry data. It can efficiently store, scale and retrieve time-stamped data that is written in high velocity, making it perfect for real-time analytics.

  2. 02
    Personalization and Recommendation Engines

    Leveraging Amazon Keyspaces allows for the quick retrieval of user preferences and interactions to deliver personalized content and recommendations in applications. Its scalable nature helps in managing the dynamic user data and provides low-latency access to data ensuring a tailored user experience.

  3. 03
    Inventory Management

    Retailers and e-commerce platforms can take advantage of Amazon Keyspaces to manage inventory levels across multiple locations. The service allows real-time tracking of stock, facilitating a responsive supply chain and optimizing stock levels according to demand patterns.

  4. 04
    Gaming Leaderboards

    For gaming platforms, Amazon Keyspaces can store and update real-time leaderboards, handling high volumes of write and read requests as gamers post new scores. It ensures consistent, low-latency performance which is crucial for a competitive gaming experience.

  5. 05
    Event Log Processing

    Organizations can use Amazon Keyspaces to capture, store, and analyze event logs from various applications or services. It offers easy scalability to accommodate spikes in event data and allows for the quick query and analysis of logs for monitoring or troubleshooting purposes.

  6. 06
    Session Management

    Amazon Keyspaces is well-suited for session management in web and mobile applications, as it can handle large volumes of concurrent sessions with ease. Its fast read and write capabilities ensure a smooth user experience by quickly saving and retrieving session data.

How Amazon Keyspaces (for Apache Cassandra) is priced

Amazon Keyspaces (for Apache Cassandra) offers On-Demand and Provisioned Capacity pricing for read/write throughput, charges for data storage per GB-month, and fees for data transfer out of region or to the internet.

On-Demand Capacity Mode

On-demand reads are metered in read request units (RRUs), and writes are metered in write request units (WRUs). You pay only for the reads and writes your application actually performs, without specifying throughput in advance.

Provisioned Capacity Mode

The Provisioned Capacity mode allows you to specify the number of reads and writes per second that you expect your application to require. You pay for the provisioned capacity by the hour, regardless of the amount of data read or written, which can offer cost savings for predictable workloads.

Data Storage

Amazon Keyspaces charges for the storage space your data consumes in the AWS cloud, with a price per GB-month. This includes table data and indexes.

Data Transfer

Inbound data transfer and transfers between Keyspaces and other AWS services in the same Region are free. Cross-Region data transfer using Multi-Region Replication is also free. Other cross-Region transfers are charged on both sides, and internet outbound transfer is subject to data transfer pricing.

Database Savings Plans

Database Savings Plans offer savings in exchange for a commitment to a specific amount of usage, measured in dollars per hour, over a one-year term.

Point-in-Time Recovery

PITR is charged based on the size of each table on which it is enabled, monitored continuously throughout the month, with billing continuing until PITR is disabled.

Backup Restore

Restoring a table from continuous backups is charged based on the total size of data restored for each request.

Time to Live Deletes

TTL operations are charged in TTL delete units, consuming one unit per KB of data per row deleted or updated.

Keyspaces Streams

Reading Keyspaces Streams is charged in streams read request units, separately from table read requests. Each GetRecords API call consumes one streams read request unit and returns up to 1 MB of data.

Services Amazon Keyspaces (for Apache Cassandra) works with

Amazon CloudWatchAmazon CloudWatch

Amazon Keyspaces publishes metrics to CloudWatch for monitoring table throughput, latency, throttling, and errors. CloudWatch alarms can notify you when requests are throttled or consumed capacity approaches provisioned limits.

Amazon DynamoDBAmazon DynamoDB

Amazon Keyspaces CDC consumers using the Kinesis Client Library use DynamoDB tables to coordinate workers and store leases and checkpoints. This lets multiple workers share change-stream processing and resume after interruptions.

Amazon EMRAmazon EMR

Amazon Keyspaces works with Spark jobs on Amazon EMR through the Spark Cassandra Connector. Jobs can read tables for distributed processing or write transformed data back to Keyspaces.

Amazon EventBridgeAmazon EventBridge

Amazon Keyspaces management API calls recorded by CloudTrail can match EventBridge rules. For example, a rule can start an automation workflow when a table is created or deleted.

Amazon S3Amazon S3

Amazon Keyspaces data can be exported to S3 using AWS Glue and the Spark Cassandra Connector, and data stored in S3 can be loaded into Keyspaces tables. This supports archival exports and bulk-loading workflows.

Amazon VPCAmazon VPC

Amazon Keyspaces supports interface VPC endpoints so clients can access its APIs and Cassandra-compatible endpoints privately. Endpoint security groups and policies help control which workloads can reach the service.

AWS Auto ScalingAWS Auto Scaling

Amazon Keyspaces uses Application Auto Scaling to adjust provisioned read and write capacity automatically. Target-tracking policies increase or decrease capacity as table utilization changes.

AWS CloudFormationAWS CloudFormation

Amazon Keyspaces keyspaces and tables can be provisioned and managed as CloudFormation resources. Templates can define table schemas, capacity settings, encryption, and point-in-time recovery alongside application infrastructure.

AWS CloudTrailAWS CloudTrail

Amazon Keyspaces records supported management API activity in CloudTrail, including operations that create, update, and delete resources. These records identify the caller and request details for auditing database configuration changes.

AWS ConfigAWS Config

Amazon Keyspaces keyspaces and tables are supported AWS Config resource types. Config can record their configurations and track changes for inventory and compliance evaluation.

What is Amazon Keyspaces (for Apache Cassandra)

3 min read

Amazon Keyspaces is a scalable, fully managed, and serverless Apache Cassandra-compatible database service offered by Amazon Web Services (AWS). This service is designed for developers who require the performance, scalability, and wide-column store features of Apache Cassandra, along with the operational benefits of a fully managed service. 

With Amazon Keyspaces, developers can run their Cassandra workloads on AWS using the same Cassandra application code and developer tools that they are accustomed to, but without the need to provision, configure, or manage the underlying infrastructure. 

Amazon Keyspaces change data capture (CDC) streams record row-level change events in near-real time. Applications can use the Kinesis Client Library (KCL) to consume and process these streams.

Time to Live (TTL) automatically expires table data based on the TTL value you set.

Amazon Keyspaces offers Murmur3Partitioner as the default partitioner, along with RandomPartitioner and DefaultPartitioner. The partitioner can be changed at the account level separately for each Region.

The maximum row size is 1 MB, excluding static column data.

Amazon Keyspaces is built to offer high availability and durability. It replicates data across multiple AWS Availability Zones in a region, providing a well-architected solution that automatically scales to handle large amounts of reads and writes per second. This ensures that a developer's data is available when needed and is safeguarded against outages. The service provides a consistent performance experience, irrespective of the scale of operations, making it ideal for applications that cannot afford any performance bottlenecks. 

Multi-Region Replication provides automated, fully managed, active-active replication across your chosen AWS Regions, supporting local reads and writes for global applications and resilience to regional degradation.

Multi-Region tables require write throughput configured in on-demand capacity mode or provisioned capacity mode with auto scaling. Capacity planning must account for writes from all Regions so that each Region has sufficient capacity for replicated writes.

A notable advantage of Amazon Keyspaces is that it eliminates the complex and time-consuming tasks of managing a Cassandra cluster. Tasks such as hardware provisioning, setup and configuration, software patching, and backups are handled by AWS. Developers can launch a Cassandra-compatible keyspace in just a few clicks and immediately start building their applications. This reduction in management overhead allows teams to focus their resources on the application innovation rather than the intricacies of infrastructure management. 

Moreover, Amazon Keyspaces integrates seamlessly with many AWS services and features such as AWS Identity and Access Management (IAM) for fine-grained access control, AWS CloudTrail for auditing, and Amazon CloudWatch for metrics and monitoring. This level of integration simplifies the process for developers to secure, monitor, and audit their keyspaces and underlying data. 

The service offers an on-demand capacity mode as well, which requires no capacity planning. This enables developers to pay only for the resources they use, further scaling up or down automatically in response to the application's actual request throughput, making Keyspaces cost-effective and eliminating the risk of over-provisioning. 

Amazon Keyspaces also offers provisioned capacity mode for predictable traffic. You specify the expected number of reads and writes per second and can enable auto scaling to adjust provisioned capacity in response to actual traffic.

In summary, Amazon Keyspaces brings Apache Cassandra's wide-column store and powerful capabilities into the AWS Cloud as a fully managed service, thereby extending its accessibility and viability for contemporary cloud-based applications. It empowers organizations to leverage Cassandra's NoSQL database features without the overhead of managing infrastructure so they can concentrate on creating applications that scale flexibly, perform consistently, and integrate effortlessly with other AWS services.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.