DEV Community

Cover image for How to import all AWS profiles from AWS LandingZone
DevOps Pass AI for DevOps Pass AI

Posted on

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 you need.

Yeah…that’s Enterprise baby!

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

Sync AWS profiles from LandingZone

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?

AWS Profile actions

  • 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

Rate Us

Give us a start, we’re kitties 🐱🐯

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

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more