How to import all AWS profiles from AWS LandingZone

How to import all AWS profiles from AWS LandingZone

If your organization using multiple AWS accounts, you probably know URL’s like https://d-XXX.awsapps.com/start/#/ where you could login with your identity provider and and get credentials for AWS account youu need.

But what if that account list is a bit long…what if each of 268 accounts has more than one role?! What if you want to switch between them or sync credentials for multiple? DevOps Pass AI tries to simplify it a bit for you.

Load AWS profiles from SSO

First of all it allows you to import all that profiles to your ~/.aws/profiles file. If you wish it can sync all credentials for all profiles to ~/.aws/credentials

All you need is paste your AWS LandingZone URL and click green button. It will open new window where you have to pass auth to LZ (via your corporate MS AD account, Okta, whatever). Once you logged in, script will grab all your accounts/roles and create profiles in ~/.aws/profiles and sync AWS credentials if requested.

Actions for AWS Profiles

Ok, now you have profiles in place, you have list of them on “AWS Profiles” tab, what else?

You can AWS Console for that ACCOUNT-ROLE

Refresh AWS Credentials in ~/.aws/credentials file

Make current account default and put its credentials to “[default]” account in ~/.aws/credentials

Refresh credentials will do almost the same action like for all accounts, but using cached credentials, if credentials doesnt work it will ask you to login to AWS LandingZone again.

Thats it! I hope it was useful, leave a comment!

Support Us, Contact Us

Give us a start, we’re kitties 🐱🐯

Give us a star 🌟 on GitHub or join our community on Slack.

Leave a Reply

Your email address will not be published. Required fields are marked *