Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Delete HSM users using CloudHSM CLI

Focus mode
Delete HSM users using CloudHSM CLI - AWS CloudHSM

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
  1. Use the following command to start CloudHSM CLI interactive mode.

    Linux
    $ /opt/cloudhsm/bin/cloudhsm-cli interactive
    Windows
    C:\Program Files\Amazon\CloudHSM\bin\> .\cloudhsm-cli.exe interactive
    $ /opt/cloudhsm/bin/cloudhsm-cli interactive
  2. Use the login command and log in to the cluster as the admin.

    aws-cloudhsm > login --username <USERNAME> --role admin
  3. 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" } }
  4. 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.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.