Bootstrap FreeKB - Amazon Web Services (AWS) - Delete IAM User using the AWS CLI
Amazon Web Services (AWS) - Delete IAM User using the AWS CLI


This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.

The aws iam list-users command can be used to list the IAM users that have been created.

~]$ aws iam list-users
{
    "Users": [
        {
            "Path": "/",
            "UserName": "john.doe",
            "UserId": "AIDAABCDL76GLUA6B21234",
            "Arn": "arn:aws:iam::123456789012:user/john.doe",
            "CreateDate": "2022-09-13T11:13:03+00:00"
        }
    ]
}

 

The aws iam delete-user command can be used to delete an IAM User. The delete-user command will not display any output, so it's usually a good idea to re-issue the aws iam list-users command to confirm the User no longer exists.

aws iam delete-user --user-name john.doe

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter b6fa40 in the box below so that we can be sure you are a human.