How can I interact with eks using python sdk when my clusters/account are protected with SSO? When using bash aws cli, I connect with aws sso login --profile mssp2-prod
and everything works fine… but when I try to run my python script, I get InsecureRequestWarning: Unverified HTTPS request is being made to host '<http://XXXXXXXXgr7.us-east-1.eks.amazonaws.com|XXXXXXXXgr7.us-east-1.eks.amazonaws.com>'. Adding certificate verification is strongly advised. See: <https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings>
and HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Unauthorized","reason":"Unauthorized","code":401}
I know the first one is just a warning… so I’m more concerned about the second one, which is indeed the error… Here’s what I am trying: https://bpa.st/N6GQ