I have setup a lamdba function that needs to call connect to EKS and call the API server to get the list of nodes.
I have setup the authorization correctly however I still see that the API server is recognizing the lambda as anonymous
Below is the error I get
HTTP response body:
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "nodes is forbidden: User \"system:anonymous\" cannot list resource \"nodes\" in API group \"\" at the cluster scope",
"reason": "Forbidden",
"details": {
"kind": "nodes"
},
"code": 403
}
I have the added the lambda role arn in my aws-auth configmap.
- groups:
- system:masters
rolearn: arn:aws:iam::{account_id}:role/{lambda_name}
Also the lambda has permissions to perform all actions on all the resources in the eks in its policy.
Any idea what I may be missing here?