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.”

Mark a key as trusted using CloudHSM CLI

Focus mode
Mark a key as trusted using CloudHSM CLI - AWS CloudHSM

The content in this section provides instructions on using CloudHSM CLI to mark a key as trusted.

  1. Using the CloudHSM CLI login command, log in as a crypto user (CU).

  2. Use the key list command to identify the key reference of the key you want to mark as trusted. The following example lists the key with the label key_to_be_trusted.

    aws-cloudhsm > key list --filter attr.label=test_aes_trusted { "error_code": 0, "data": { "matched_keys": [ { "key-reference": "0x0000000000200333", "attributes": { "label": "test_aes_trusted" } } ], "total_key_count": 1, "returned_key_count": 1 } }
  3. Using the Log out of an HSM using CloudHSM CLI command, log out as a crypto user (CU).

  4. Using the Log in to an HSM using CloudHSM CLI command, log in as an admin.

  5. Using the key set-attribute command with the key reference you identified in step 2, set the key's trusted value to true:

    aws-cloudhsm > key set-attribute --filter key-reference=<Key Reference> --name trusted --value true { "error_code": 0, "data": { "message": "Attribute set successfully" } }
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.