Question: Why can't I scale down my ElastiCache cluster?

Why can't I scale down my Amazon ElastiCache cluster?ResolutionIf you're unable to scale down your cluster, check the following:Cache data sizeThe new node type might not have sufficient memory to store cache data. Every ElastiCache node has a dedicated amount of memory reserved for the Redis engine. For example, the cache.m5.xlarge node type has 12.93 GiB of storage. By default, ElastiCache reserves 25% of the total memory for administrative tasks such as fullsync and creating snapshots. You can change this amount using the reserved-memory-percent parameter.For a list of node types and storage amounts, see Amazon ElastiCache pricing.Using the cache.m5.xlarge node as an example, the Redis engine can use 9.69 GiB (maxmemory) to hold the keyspace. The remaining memory is held as reserve memory. Your current node type uses all of the available memory for the data. The new node type provides less than 9.69 GiB of memory. So, the scale down fails.Use the info memory command to verify the memory usage shown in the used_memory and maxmemory parameters for the node. Note that the info memory command shows the memory in "GB". The Amazon ElastiCache pricing page shows the memory in "GiB".test.xm4oz6.ng.0001.use1.cache.amazonaws.com:6379> info memory# Memoryused_memory:5579416used_memory_human:5.32Mused_memory_rss:11218944used_memory_rss_human:10.70Mused_memory_peak:5856480used_memory_peak_human:5.59Mmaxmemory:10418941287maxmemory_human:9.70GIf there isn't enough available memory on the node, reduce your cache data. Or, choose a node type that has more capacity.Available node typesDetermine what node types you can select from your current node type when scaling up and down. You can use the ListAllowedNodeTypeModifications API call to do this. This API call lists all available node types that you can scale your Redis cluster or replication group's current node type to.To view the available node types for your Redis cluster, run the ListAllowedNodeTypeModifications API call from the AWS Command Line Interface (AWS CLI). The resulting list displays the node types that you can scale to.Note: If you receive errors when running AWS CLI commands, make sure that you’re using the most recent version of the AWS CLI.$aws elasticache list-allowed-node-type-modifications --replication-group-id checkout-cache-test{  "ScaleUpModifications": [    "cache.r4.16xlarge",    "cache.r5.12xlarge",    "cache.r5.24xlarge",    "cache.r5.4xlarge"  ],  "ScaleDownModifications": [    "cache.m3.2xlarge",    "cache.m3.large",    "cache.m3.medium",    "cache.m3.xlarge",    "cache.m4.2xlarge",    "cache.m4.4xlarge",    "cache.m4.large",    "cache.m4.xlarge",    "cache.r3.2xlarge",    "cache.r3.large",    "cache.r3.xlarge",    "cache.r4.2xlarge",    "cache.r4.large",    "cache.r4.xlarge",    "cache.t2.medium",    "cache.t2.micro",    "cache.t2.small",    "cache.t3.medium",    "cache.t3.micro",    "cache.t3.small"  ]}Note: The time it takes to scale to a smaller node type depends on your node type and the amount of data in your current cache cluster.

Related informationManaging reserved memoryScaling down Redis cache clusters (AWS CLI)