DEV Community

Camille Chang
Camille Chang

Posted on

OpenLens Cannot Connect to AWS EKS Cluster: executable aws not found

Overview

Attempting to use OpenLens locally to access a remote AWS EKS environment.
AWS SSO has been configured successfully, and access via the local terminal works as expected. However, OpenLens fails to connect to the cluster.

Environment Setup

AWS SSO login and verification:

aws sso login --profile profileA
aws sts get-caller-identity --profile profileA

EKS kubeconfig update:

aws eks update-kubeconfig --name clusterA --profile profileA

Actual Result:

  • Access via local terminal works:

kubectl get nodes

The Fix

  • 1. Verify AWS CLI installation Run this in a terminal:
aws --version
Enter fullscreen mode Exit fullscreen mode
  • 2. Add AWS CLI to system PATH Check:
which aws
Enter fullscreen mode Exit fullscreen mode

Typical locations:
macOS (Intel): /usr/local/bin/aws
macOS (Apple Silicon): /opt/homebrew/bin/aws

Then make it globally available.
macOS (Apple Silicon – most common)
sudo ln -s /opt/homebrew/bin/aws /usr/local/bin/aws

Restart OpenLens completely.

  • 3. Or Hardcode full path to AWS CLI in kubeconfig. Edit your kubeconfig: ~/.kube/config Change: command: aws To: command: /opt/homebrew/bin/aws This guarantees OpenLens can execute it.

Top comments (0)