Session issue #3921
-
Hiya, I'm writing a simple script where first I get the list of regions where EKS is available and then I want to list all my clusters in those regions. I'm using the assume tool which will export the access key, session token for my SSO role to the ENV variables. Here's is example code:
When I do this, I get the list of regions but then when it tries to list the clusters I get the following error: If I were to provide it a manual list like this, the list cluster would work properly
I've also tried different sessions:
But that prints out the clusters for the default region of my credentials If I add It seems as though after calling session it almost invalidates the session and doesn't read the default creds Any thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
Hi @abellpb, thanks for reaching out. I suspect that this is happening because many of the regions returned by |
Beta Was this translation helpful? Give feedback.
-
Closing the discussion for staleness. Please open a new discussion if you have further concerns. |
Beta Was this translation helpful? Give feedback.
-
Closing the discussion for staleness. Please open a new discussion if you have further concerns. |
Beta Was this translation helpful? Give feedback.
-
Closing the discussion for staleness. Please open a new discussion if you have further concerns. |
Beta Was this translation helpful? Give feedback.
Hi @abellpb, thanks for reaching out. I suspect that this is happening because many of the regions returned by
get_available_regions('eks')
are opt-in regions. Enable those opt-in regions, and this should work fine.