HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/awscli/examples/kms/list-keys.rst
**To get the customer master keys (CMKs) in an account and Region**

The following ``list-keys`` example gets the CMKs in an account and Region. This command returns both AWS managed CMKs and customer managed CMKs. ::

    aws kms list-keys 

Output::

    {
        "Keys": [
            {
                "KeyArn": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
                "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab"
            },
            {
                "KeyArn": "arn:aws:kms:us-west-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
                "KeyId": "0987dcba-09fe-87dc-65ba-ab0987654321"
            },
            {
                "KeyArn": "arn:aws:kms:us-east-2:111122223333:key/1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d",
                "KeyId": "1a2b3c4d-5e6f-1a2b-3c4d-5e6f1a2b3c4d"
            }
        ]    
    }

For more information, see `Viewing Keys <https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html>`__ in the *AWS Key Management Service Developer Guide*.