Search code examples
amazon-web-servicesamazon-iam

How to change the IAM username in my AWS account?


I have been using an AWS account for more than 6 months now and it was created by my Manager for project purposes. At first, it was made for testing purposes but it is now handled by 3-5 people in my team. The account's username is my name, which I need to change to my team name or the project name. But I can't find an option for that in the Users dashboard.

The manager provided me with AdministratorAccess in my IAM profile but still, there is no option in the IAM profile. Upon searching on the internet, only the root account can perform this operation which is handled by someone whom we cannot contact. Since the access key of this account is used in several codes and projects, it is hard to create a new account for this purpose.

Is it possible to change the username without any root account in AWS?


Solution

  • You can try doing it with AWS CLI, I have administrator access and it worked for me. You don't need root account for this. Administrator access will work, or even with someone who has full access to IAM.

    aws iam update-user \
        --user-name <current user name> \
        --new-user-name <new user name> \
        --profile <your profile>
    

    Try it out with a profile which has access to IAM