Getting started with Amazon Keyspaces (for Apache Cassandra) - Amazon Keyspaces (for Apache Cassandra)
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Getting started with Amazon Keyspaces (for Apache Cassandra)

If you're new to Apache Cassandra and Amazon Keyspaces, this tutorial guides you through installing the necessary programs and tools to use Amazon Keyspaces successfully. You'll learn how to create a keyspace and table using Cassandra Query Language (CQL), the Amazon Web Services Management Console, or the Amazon Command Line Interface (Amazon CLI). You then use Cassandra Query Language (CQL) to perform create, read, update, and delete (CRUD) operations on data in your Amazon Keyspaces table.

This tutorial covers the following steps.

  • Prerequisites – Before starting the tutorial, follow the Amazon setup instructions to sign up for Amazon and create an IAM user with access to Amazon Keyspaces. Then you set up the cqhsh-expansion and Amazon CloudShell. Alternatively you can use the Amazon CLI to create resources in Amazon Keyspaces.

  • Step 1: Create a keyspace and table – In this section, you'll create a keyspace named "catalog" and a table named "book_awards" within it. You'll specify the table's columns, data types, partition key, and clustering column using the Amazon Web Services Management Console, CQL, or the Amazon CLI.

  • Step 2: Perform CRUD operations – Here, you'll use the cqlsh-expansion in CloudShell to insert, read, update, and delete data in the "book_awards" table. You'll learn how to use various CQL statements like SELECT, INSERT, UPDATE, and DELETE, and practice filtering and modifying data.

  • Step 3: Clean up resources – To avoid incurring charges for unused resources, this section guides you through deleting the "book_awards" table and "catalog" keyspace using the console, CQL, or the Amazon CLI.

For tutorials to connect programmatically to Amazon Keyspaces using different Apache Cassandra client drivers, see Using a Cassandra client driver to access Amazon Keyspaces programmatically. For code examples using different Amazon SDKs, see Code examples for Amazon Keyspaces using Amazon SDKs.