メインコンテンツまでスキップ

Getting started

Preview

Momento Cache (Cluster and Flex) is available in limited preview. Request access before following this guide.

Request preview access

  1. Set up AWS Marketplace billing.
  2. Email Momento Support with the subject [ACCESS] enable Momento Cache. Include your Momento Account ID.

Allow one or more business days for the request to be processed.

This quickstart takes you from nothing to running Valkey commands against a managed Database in Momento Cache. You will use the Momento CLI for each management operation, then retrieve the connection endpoint from the console.

You need:

  • A Momento account with access to the Momento Cache limited preview.
  • The Momento CLI.
  • valkey-cli (or redis-cli).
  • Valid availability-zone IDs for the region where you will create the Pool.

1. Configure a CLI profile

In the Momento console, create or retrieve an API key and copy the endpoint identifier for the region where you want to create the Pool.

Configure a named CLI profile and enter the API key and endpoint identifier when prompted:

momento configure --profile cache-quickstart

The commands below use that profile. You can choose a different profile name.

2. Create a Capacity Pool

Create a Flex Pool with capacity and replication bounds. The example uses two US East (N. Virginia) availability-zone IDs; replace them with valid AZ IDs for the region selected by your profile.

momento preview pool create \
--profile cache-quickstart \
--name quickstart-pool \
--capacity-gib 32..128 \
--replicas-per-shard 1..2 \
--zones use1-az1,use1-az2

This is a Flex (managed) Pool: Momento selects and automatically resizes the underlying topology within those bounds. To create a Cluster (explicit) Pool instead, provide --instance-type and --shard-count, and pass a single value to --replicas-per-shard. See Momento CLI (preview).

Provisioning runs in the background. Check the lifecycle status until it is active:

momento preview pool get-status \
--profile cache-quickstart \
--name quickstart-pool

If provisioning is blocked, view diagnostics:

momento preview pool describe \
--profile cache-quickstart \
--name quickstart-pool

The service keeps retrying an accepted configuration; see Manage Capacity Pools.

3. Create a Database

Once the Pool is active, create a Database on it:

momento preview database create \
--profile cache-quickstart \
--name quickstart-db \
--pool-name quickstart-pool

Database creation is immediate because the Pool's capacity already exists.

4. Get your connection details

In the limited-preview console, open Capacity Pools, select your Pool, and open its Databases tab. Copy the account-visible RESP endpoint shown there. The console is the authoritative source for the endpoint; do not construct it from a region or cell name.

The Database CLI and panel do not vend a credential. Use the API key you created through Key Management, or another appropriate Momento credential, as the password and treat it as a secret.

Your connection details are:

  • Host: the region's RESP endpoint
  • Port: 6379 (default) with TLS
  • Username: your Database name
  • Password: your Momento API key or token

5. Connect and run a command

valkey-cli --tls \
-h <resp-endpoint> \
--user quickstart-db \
--pass $MOMENTO_API_KEY

> SET greeting "hello"
OK
> GET greeting
"hello"

You are now reading and writing against a managed Valkey Database.

6. Clean up

Delete the Database before its Pool:

momento preview database delete \
--profile cache-quickstart \
--name quickstart-db

momento preview pool delete \
--profile cache-quickstart \
--name quickstart-pool

Next steps