Skip to main content
idle · aws

MemoryDB clusters with no new connections and no read or write commands for 30 days

resource types
1
rule IDs covered
1
severity
medium

What does ZopNight detect here?

ZopNight flags an Amazon MemoryDB cluster when `NewConnections`, `GetTypeCmds` and `SetTypeCmds` all stay below 1, on both average and peak, across at least 30 days of CloudWatch data. MemoryDB bills on-demand nodes by the instance hour, so the saving is the cluster's full run-rate across every shard and replica.

Signal and threshold

How ZopNight evaluates MemoryDB clusters with no new connections and no read or write commands for 30 days.
Field Value
Rule IDsRC-105
Categoryidle
Severitymedium
MetricNewConnections, GetTypeCmds, SetTypeCmds
Thresholdbelow 1 on all three (average and peak)
Evaluation window30d
SourceZopNight
Permissions usedmemorydb:DescribeClusters · cloudwatch:GetMetricStatistics

Every node in every shard is an hourly charge

MemoryDB pricing lets you pay for on-demand nodes by the instance hour with no commitment. A cluster’s cost is its node type multiplied by the number of shards and by the primary plus replicas in each shard, and every one of those nodes bills whether or not a client connects.

Because MemoryDB is a durable primary database rather than a cache, teams are cautious about deleting clusters, which is exactly why abandoned ones linger.

Reading connection and command metrics

The MemoryDB metrics reference defines NewConnections as connections accepted by the server during the period, GetTypeCmds as read-only commands and SetTypeCmds as write commands, both summed from commandstats:

Terminal window
aws memorydb describe-clusters --query 'Clusters[].[Name,NodeType,NumberOfShards]' --output table
for m in NewConnections GetTypeCmds SetTypeCmds; do
aws cloudwatch get-metric-statistics \
--namespace AWS/MemoryDB --metric-name "$m" \
--dimensions Name=ClusterName,Value=my-cluster Name=NodeId,Value=0001-001 \
--start-time 2026-08-26T00:00:00Z --end-time 2026-09-25T00:00:00Z \
--period 86400 --statistics Maximum
done

AWS’s own CLI example queries these metrics with the ClusterName and NodeId dimensions, so repeat the loop for each node in the cluster.

Three quiet signals, not one

A cluster qualifies only when all three series have at least 30 days of coverage and each reads below 1 on both its average and its peak. Connections alone are not enough, because long-lived client pools can keep connections open without creating new ones; the two command counters are what show whether anything is actually reading or writing. A cluster serving only reads, or only writes, is excluded. The cluster must also have a priced monthly run-rate.

Why a cluster may not appear

If any of the three metrics is missing, or has less than 30 days of history, ZopNight treats that as missing evidence rather than as idleness and raises nothing. The same happens when the cluster has no price. There is no tag or name-based override in either direction.

The run-rate is the saving

Terminal window
saving = node hourly price x nodes per shard x shards x hours per month
cost after fix = 0

ZopNight takes this from its resolved monthly run-rate for the cluster rather than recomputing it from list prices on the page.

Shutting down an unused cluster

  1. Confirm the three metrics are flat over 30 days or longer in CloudWatch.
  2. Search application config and Secrets Manager for the cluster endpoint.
  3. Delete with a final snapshot: aws memorydb delete-cluster --cluster-name my-cluster --final-snapshot-name my-cluster-final.
  4. If the cluster is only oversized, reduce shards or replicas instead of deleting it.

See it fire on your bill.

Connect an account read-only. The first findings land in minutes.

472 rule families across 353 resource types on 22 platforms. Every threshold, metric, and IAM action is documented on these pages before you grant anything.

472 rule families documented
353 resource types covered
read-only default access level
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·