Powershell script to modify eks nodegroup across multiple accounts

0

Hi everyone, Need assistance with writing a PS script that will log into different AWS GovCloud accounts and modify the eks nodegroup. I know the eks command would be like this "aws eks update-nodegroup-config --cluster-name <name>, --nodegroup-name <name> minSize=#,maxSize=#,desiredSize=#"

But I'm not sure how to get the creds to log into each account? We use SSO if that helps. Don't want to create a new IAM user/role if possible.

1 Answer
0
Accepted Answer

I learned for the first time that AWS SSO is also available in AWS GovCloud.
I believe this would allow us to manage multiple accounts.
https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-sso.html

The following documents may be of use to you.
https://aws.amazon.com/jp/blogs/containers/a-quick-path-to-amazon-eks-single-sign-on-using-aws-sso/

If the above is difficult, it will be necessary to create a cross-account access IAM role or take other action.
https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html

profile picture
EXPERT
answered 10 months ago
profile picture
EXPERT
reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions