CmdID

CmdID / aws / aws kms

aws kms list-keys

Gets a list of all KMS keys in the caller's Amazon Web Services account and Region. AWS CLI reference

1 example 2 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To get the KMS keys in an account and Region

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

aws kms list-keysIdentify
Its output
{
    "Keys": [
        {
            "KeyArn": "arn:aws:kms:us-west-2:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "KeyId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
        },
        {
            "KeyArn": "arn:aws:kms:us-west-2:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
            "KeyId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222"
        },
        {
            "KeyArn": "arn:aws:kms:us-west-2:123456789012:key/a1b2c3d4-5678-90ab-cdef-EXAMPLE33333",
            "KeyId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333"
        }
    ]
}

For more information, see Viewing Keys in the AWS Key Management Service Developer Guide.

Options

2 in the AWS CLI reference
--limitUse this parameter to specify the maximum number of items to return.
--markerUse this parameter in a subsequent request after you receive a response with truncated results.