Delete HSM users using CloudHSM CLI
Use user delete in the CloudHSM CLI to delete a hardware security module (HSM) user. You must log in as an admin to delete another user.
Tip
You can't delete crypto users (CU) that own keys.
To delete a user
-
Use the following command to start CloudHSM CLI interactive mode.
-
Use the login command and log in to the cluster as the admin.
aws-cloudhsm >
login --username
<USERNAME>
--role admin -
The system prompts you for your password. Enter the password, and the output shows that the command was successful.
Enter password:
{ "error_code": 0, "data": { "username": "admin", "role": "admin" } }
Use the user delete command to delete the user.
aws-cloudhsm >
user delete --username
<USERNAME>
--role<ROLE>
For more information about user delete, see deleteUser.