When working on AWS, we have multiple IAM users to manage. Even if someone is the root user, they should generally use the IAM user for day to day account management.
As an organisation, it is also recommended that you separate resources into atleast 3 different accounts: a sandbox account for experiments, a dev account, and a prod account.
With this, it becomes a little confusing as to which account is which. For example, is account number 219066881281 my production account or dev account? What about 917733831218? (PS: These account numbers are fake).
This also causes confusion with the sign-in urls. The sign-in url is of the format — https://<ACCOUNT NUMBER>.signin.aws.amazon.com/console
The solution to this is using aliases. AWS allows you to have aliases for different accounts. You can find the steps here, under the section Creating and Deleting Aliases (Console).
Let’s say the name of your organisation is FooBar International. You can name aliases in the following manner: foobar-root, foobar-sandbox, foobar-dev, foobar-prod.
Now your sign-in urls become simple :
On your local machine, you can create multiple AWS profiles, and name the profile by the alias. That makes using the CLI much easier.
If you liked this article, please share it on social media.
View my courses on Udemy — https://www.udemy.com/user/abhinav-manchanda/
Subscribe to us on Linkedin — https://www.linkedin.com/company/interleap
View all our Youtube Videos — https://www.youtube.com/channel/UC9NGO7UNyFIAK8I-as9SeLg/videos
Join our Facebook Group — https://www.facebook.com/groups/1065474107206895
Subscribe to us on Youtube for an awesome video every Wednesday!