Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS ElastiCache Describe CacheClusters

I am trying to run the describe_cache_clusters command on Python using boto3. This command works when my ElastiCache Cluster has one node, but it does not work when there are multiple nodes. I get the same error as well when I use the AWS CLI command which is that the cluster is not found.

    client = boto3.client('elasticache')
    paginator = client.get_paginator('describe_cache_clusters')
    response = paginator.paginate(
    CacheClusterId='xxxxx',
    ShowCacheNodeInfo=True,
    ShowCacheClustersNotInReplicationGroups=False,)

Is this a shortcoming of the function itself? I am trying to get the cachecluster endpoint without having to use the UI.

Here are some of the ElastiCache configuration:

Redis: 3.2.4
NodeType cache.r3.large
1 Shard, 3 Nodes
like image 702
kvdesai2 Avatar asked Jun 25 '26 22:06

kvdesai2


1 Answers

I figured out my problem. Since there are multiple nodes I need a -001 (or2,3,) in the cachecluseterid. Then the function works

like image 90
kvdesai2 Avatar answered Jun 27 '26 11:06

kvdesai2



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!