delete-user¶
Deletes the specified IAM user. Unlike the AWS Management Console, when you delete a user programmatically, you must delete the items attached to the user manually, or the deletion fails. For more information, refer to Deleting an IAM User. Before attempting to delete a user, remove the following items:
Access keys (DeleteAccessKey)
Git credentials (DeleteServiceSpecificCredential)
Attached managed policies (DetachUserPolicy)
Group memberships (RemoveUserFromGroup)
Refer to AWS help for descriptions of global parameters.
Synopsis¶
delete-user
--user-name <value>
Options¶
--user-name (string)
The name of the user to delete.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters:
_,+,=,,,.,@, and-.
Refer to AWS help for descriptions of global parameters.
Examples¶
To delete an IAM user
The following delete-user command removes the IAM user named Bob from
the current account
aws iam delete-user --user-name Bob
For more information, refer to Deleting a User from Your AWS Account in the Using IAM guide.
Output¶
None

