Search code examples
amazon-web-servicesredisamazon-elasticachevalkey

AWS ElastiCache in cluster mode has no Primary / Reader endpoints


I created a dev/test instance in AWS via GUI, waited for it to fully provision and set up but it does not have any endpoints

GUI SNAPSHOT

Querying it via aws elasticache describe-replication-groups only has management address

For curiosity, I created a Cache Cluster instead and it had endpoints


Solution

  • From the replication endpoints documentation, Valkey or Redis OSS (cluster mode enabled) clusters with replicas, because they have multiple shards (API/CLI: node groups), which mean they also have multiple primary nodes, have a different endpoint structure than Valkey or Redis OSS (cluster mode disabled) clusters. Valkey or Redis OSS (cluster mode enabled) has a configuration endpoint which "knows" all the primary and node endpoints in the cluster.

    From Finding connection endpoints in ElastiCache, to find the endpoints for cluster mode enabled Valkey clusters CLI, you can find it by using the command

    aws elasticache describe-cache-clusters \
        --cache-cluster-id <cluster id> \
        --show-cache-node-info  
    

    Alternatively, you can also find it on the console

    To find a Valkey or Redis OSS (cluster mode enabled) cluster's endpoint by following the provided step

    • Sign in to the AWS Management Console and open the ElastiCache console at https://console.aws.amazon.com/elasticache/
    • From the navigation pane, choose Valkey clusters or Redis OSS clusters.
    • The clusters screen will appear with a list of clusters. Choose the cluster you wish to connect to.
    • To find the cluster's Configuration endpoint, choose the cluster's name (not the radio button).
    • The Configuration endpoint is displayed under Cluster details. To copy it, choose the copy icon to the left of the endpoint.