How to Get an EKS Cluster Name From an AWS Region

You can use the aws cli to get the EKS cluster name, parse the first result and return it into a variable.

EKS_CLUSTER_NAME=$(aws eks list-clusters --region us-west-2 --query clusters[0] --output text)
echo $EKS_CLUSTER_NAME