| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Deletes a user from your AWS account. When this command is used only with the -u option,
the user must not belong to any groups, have any keys or signing certificates, or have
any attached policies.
To delete the user recursively, use the -r option. Recursively
deleting the user automatically deletes it from any associated groups and deletes any
attached entities such as keys, signing certificates, and policies.
Important
Use the -r option with caution. Before performing a recursive delete, to ensure
you are not deleting anything you don't want to, use the -p option along with the -r
option to list all the user's associated entities and groups without actually performing the
recursive deletion.
iam-userdel -u
USERNAME [
-r [-p] ]
| Name | Description | Required |
|---|---|---|
|
|
Name of the user to delete. Type: String Default: None |
Yes |
|
|
Deletes the user from associated groups and deletes the user's credentials and policies along with the user. Type: String Default: None |
Optional |
|
|
Returns what would be deleted, without actually recursively deleting the
user. Use this before using Type: String Constraints: You can apply -p only together with -r. Default: None |
Optional |
If the command is successful, the output is empty.
The following example deletes the user called Jack. This example assumes Jack is in no groups and has no policies.
PROMPT> iam-userdel -u JackThe following example shows what would be deleted if you were to recursively delete the user Jack.
PROMPT> iam-userdel -u Jack -r -p
accesskeys
AKIAIOSFODNN7EXAMPLE
policies
KeyPolicy
certificates
TA7SMP42TDN5Z26OBPJE7EXAMPLE
groups
arn:aws:iam::123456789012:group/Managers
arn:aws:iam::123456789012:group/FinanceThe following example recursively deletes user Jack.
PROMPT> iam-userdel -u Jack -r