Amazon Web Services (AWS) - List ElastiCache Clusters using the AWS CLI

by
Jeremy Canfield |
Updated: February 14 2024
| Amazon Web Services (AWS) articles
This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.
The aws elasticache describe-cache-clusters command can be used to list the ElastiCache Clusters you have created.
aws elasticache describe-cache-clusters
And here is an example of how to limit the output using the --query option.
aws elasticache describe-cache-clusters --query 'CacheClusters[?CacheClusterId==`my-redis-cluster-0001-001`]'
Something like this should be returned.
{
"CacheClusters": [
{
"CacheClusterId": "my-redis-cluster-0001-001",
"ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:",
"CacheNodeType": "cache.t4g.micro",
"Engine": "redis",
"EngineVersion": "7.1.0",
"CacheClusterStatus": "creating",
"NumCacheNodes": 1,
"PreferredAvailabilityZone": "us-east-1a",
"PreferredMaintenanceWindow": "thu:08:00-thu:09:00",
"PendingModifiedValues": {},
"CacheSecurityGroups": [],
"CacheParameterGroup": {
"CacheParameterGroupName": "default.redis7.cluster.on",
"ParameterApplyStatus": "in-sync",
"CacheNodeIdsToReboot": []
},
"CacheSubnetGroupName": "redis-subnet",
"AutoMinorVersionUpgrade": true,
"SecurityGroups": [
{
"SecurityGroupId": "sg-0c3296b3cd153fdc1",
"Status": "active"
}
],
"ReplicationGroupId": "my-redis-cluster",
"SnapshotRetentionLimit": 0,
"SnapshotWindow": "09:30-10:30",
"AuthTokenEnabled": false,
"TransitEncryptionEnabled": false,
"AtRestEncryptionEnabled": true,
"ARN": "arn:aws:elasticache:us-east-1:123456789012:cluster:my-redis-cluster-0001-001",
"ReplicationGroupLogDeliveryEnabled": false,
"LogDeliveryConfigurations": [],
"NetworkType": "ipv4",
"IpDiscovery": "ipv4"
}
]
}
Did you find this article helpful?
If so, consider buying me a coffee over at