Getting Started
Creating a Cloudalus KV database as a drop-in replacement for Redis could not be easier. In this guide we'll walk you through creating and connecting to your new database.
Step 1: Create a Database
When you first login you'll have an organisation automatically created called "Default Organisation". Think of an organisation as a project folder you can invite others to.
On the left navigation bar, select "Databases", then click "Create".
Step 2: Connect from the dashboard
Next to your database, click the icon. This will open a terminal in your browser.
You can use this terminal to quickly connect to your database. You can also use the terminal to run commands such as GET and SET.
Step 3: Create a programmatic identity
To connect to your database from a Redis-compatible client, you'll need to create a programmatic identity first. You will create its access key credential in a later step.
On the left navigation bar, select "Programmatic Identities", then click "Create Programmatic Identity".
The programmatic identity itself does not grant access yet. We will attach permissions and then create an access key credential for it.
Step 4: Grant access to your database
By default, programmatic identities do not have any permissions. You'll need to grant the identity access to your database before you create and use a credential.
Next to the programmatic identity you just created, click the icon. This will open a page where you can update that identity's permissions.
For this guide, we'll grant the programmatic identity full access to all databases. Select the managed policy "KvDB Execute All Commands" (kvdb-execute-any) and click "Save".
Step 5: Create an access key credential
Once the identity has the permissions it needs, create an access key credential from the programmatic identity page.
Make sure to copy the access key secret, as you'll need it to connect to your database. It is only shown once.
Step 6: Connect from a Redis client
Now that you've granted access to your database, you can connect to it from a Redis compatible client.
When connecting you'll need to authenticate and select a database. There are a few ways to do this:
Separate AUTH and USE commands
You can use the AUTH command to authenticate with the access key. You can then use the USE command to select the database:
AUTH aks_fakeaccesskeysecret USE kvdb_fakedatabaseid
Single AUTH command
You can use the AUTH command to authenticate with the access key and select the database in a single command.
AUTH recognises both username and password as separate fields, or a single field with a colon separating the username and password.
AUTH kvdb_fakedatabaseid aks_fakeaccesskeysecret
AUTH kvdb_fakedatabaseid:aks_fakeaccesskeysecret
Using the Redis CLI
As an example, here's how you can connect to your database using the Redis CLI:
redis-cli \
--tls \
-p 6380 \
-h us-east-1.kvdb.cloudalus.com \
-a kvdb_fakedatabaseid:aks_fakeaccesskeysecret