When i am trying to connect to the cluster via lens am getting Failed to get /version for clusterId=<id>: Internal Server Erro

I am trying to connect to my kubernetes cluster which was spunup using kubeadm on aws instances. now
I am using lens desktop app on windows.
My kubeconfig file

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DATA+OMITTED
    server: https://<private ip address of the master>:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: kubernetes-admin
  name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
  user:
    client-certificate-data: DATA+OMITTED
    client-key-data: DATA+OMITTED

i think the issue is with private ip address as server.

kindly help me with this

error

E0607 15:01:56.696813 3604 proxy_server.go:147] Error while proxying request: dial tcp :6443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Failed to get /version for clusterId=: Internal Server Error

That error message implies that the server is not accessible from your Windows machine, did you perhaps use WSL to spin up the cluster and have aws only accessible from within that linux machine?

No the cluster is running on ununtu instances on aws.
Am
Trying to access it from a windows machine. And 6443 is accessible from the internet