Skip to main content

Manage Momento Cache with the CLI

Preview

Momento Cache (Cluster and Flex) is available in limited preview. Request access before using these commands.

Use the Momento CLI for common Capacity Pool and Database lifecycle operations. The commands target one region through the endpoint identifier in your selected profile.

Install and configure

Install the CLI using the instructions in the Momento CLI repository.

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

Save the API key and endpoint identifier in a named profile:

momento configure --profile cache-preview

The examples below pass --profile cache-preview. You may instead use the default profile, or pass --api-key and --endpoint directly; avoid exposing secrets in shell history.

Choose a management surface

WorkflowCLI (preview)Console (limited preview)
Create a Cluster or Flex PoolYesYes
List Pools across regionsOne selected regionAggregates configured regions
Inspect Pool status, configuration, and diagnosticsYesYes
Update a PoolYesYes
Read Pool metricsNot availablePoint-in-time Metrics tab
Create, list, and delete DatabasesYesYes, within a Pool
Describe one DatabaseYesPool-scoped row; no standalone page
Copy the RESP endpointdatabase describeDatabases tab
Delete a non-empty PoolRejectedRejected

Use the CLI for the common management path. Use the console when you need an aggregated regional view or point-in-time metrics. The HTTP API references document the lower-level surface, including the metrics scrape that the CLI does not expose.

The CLI reports errors when a create or capacity-increasing update exceeds a service limit. Use the Metrics guide for the Prometheus and conditional CloudWatch contracts that are outside the CLI.

Capacity Pool commands

Create a Capacity Pool

Create a Cluster (explicit) Pool by specifying the instance type, shard count, one fixed replica count, and availability-zone IDs:

momento preview pool create \
--profile cache-preview \
--name orders-cluster \
--instance-type r7g.xlarge \
--shard-count 3 \
--replicas-per-shard 1 \
--zones use1-az1,use1-az2

Create a Flex (managed) Pool by specifying capacity and replication bounds:

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

--zones accepts one or more AZ IDs as separate values or a comma-delimited list. These are IDs such as use1-az1, not account-specific names such as us-east-1a. Create prints the Pool name, lifecycle status, and provisioning configuration.

Inspect and list Capacity Pools

Get one Pool's lifecycle status:

momento preview pool get-status \
--profile cache-preview \
--name orders-flex

Inspect one Pool's status, configuration, and diagnostics:

momento preview pool describe \
--profile cache-preview \
--name orders-flex

List every Pool in the profile's selected region:

momento preview pool list --profile cache-preview

describe and list print provisioning, current and target Flex capacity where applicable, and diagnostics. Current and target are settled and in-flight values of the same available-capacity quantity. The CLI does not aggregate regions; select another endpoint/profile to inspect another region.

Update a Capacity Pool

The CLI infers Cluster mode from --instance-type or --shard-count and Flex mode from --capacity-gib. When an update changes only shared fields—--replicas-per-shard, --zones, or both—supply the Pool's existing --mode cluster|flex. The mode selects how to interpret the update; it is not a request to convert the Pool.

Raise a Flex Pool's capacity ceiling:

momento preview pool update \
--profile cache-preview \
--name orders-flex \
--mode flex \
--capacity-gib 32..256

Change the shard count and replicas for a Cluster Pool:

momento preview pool update \
--profile cache-preview \
--name orders-cluster \
--mode cluster \
--shard-count 4 \
--replicas-per-shard 2

An update requires at least one changed field. You can also replace the zone set with --zones. The examples include explicit modes for clarity, but their mode-specific fields are sufficient for inference. Cluster-only fields are rejected with --mode flex; --capacity-gib is rejected with --mode cluster. See Manage Capacity Pools for scaling guards and diagnostics.

Delete a Capacity Pool

Delete every Database pinned to the Pool first, then run:

momento preview pool delete \
--profile cache-preview \
--name orders-flex

The service rejects deletion while a Database remains. Accepted deletion is asynchronous and the Pool enters deleting before it is removed.

Database commands

Create a Database

The target Pool must be active:

momento preview database create \
--profile cache-preview \
--name orders \
--pool-name orders-flex

The CLI prints the Database name and backing Pool.

List Databases

momento preview database list --profile cache-preview

The command lists the Database name and Pool for every Database in the selected region.

Describe a Database

momento preview database describe \
--profile cache-preview \
--name orders

The command prints the Database name and backing Pool.

Delete a Database

momento preview database delete \
--profile cache-preview \
--name orders

Deletion is synchronous in the control plane; underlying resource reclamation follows asynchronously.