v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1450214444.9 KB

Gets a list of aliases in the caller's Amazon Web Services account and region. For more information about aliases, see CreateAlias.

By default, the ListAliases operation returns all aliases in the account and region. To get only the aliases associated with a particular KMS key, use the KeyId parameter.

The ListAliases response can include aliases that you created and associated with your customer managed keys, and aliases that Amazon Web Services created and associated with Amazon Web Services managed keys in your account. You can recognize Amazon Web Services aliases because their names have the format aws/<service-name>, such as aws/dynamodb.

The response might also include aliases that have no TargetKeyId field. These are predefined aliases that Amazon Web Services has created but has not yet associated with a KMS key. Aliases that Amazon Web Services creates in your account, including predefined aliases, do not count against your KMS aliases quota.

Cross-account use: No. ListAliases does not return aliases in other Amazon Web Services accounts.

Required permissions: kms:ListAliases (IAM policy)

For details, see Controlling access to aliases in the Key Management Service Developer Guide.

Related operations:

  • CreateAlias

  • DeleteAlias

  • UpdateAlias

post/#X-Amz-Target=TrentService.ListAliases

Query parameters

Limitstring

Pagination limit

Markerstring

Pagination token

Headers

X-Amz-Target'TrentService.ListAliases' required

Request body

KeyIdstring
<p>Lists only aliases that are associated with the specified KMS key. Enter a KMS key in your Amazon Web Services account. </p> <p>This parameter is optional. If you omit it, <code>ListAliases</code> returns all aliases in the account and Region.</p> <p>Specify the key ID or key ARN of the KMS key.</p> <p>For example:</p> <ul> <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>
Limitinteger
<p>Use this parameter to specify the maximum number of items to return. When this value is present, KMS does not return more than the specified number of items, but it might return fewer.</p> <p>This value is optional. If you include a value, it must be between 1 and 100, inclusive. If you do not include a value, it defaults to 50.</p>
Markerstring

Use this parameter in a subsequent request after you receive a response with truncated results. Set it to the value of <code>NextMarker</code> from the truncated response you just received.

Response

Success

NextMarkerstring

When <code>Truncated</code> is true, this element is present and contains the value to use for the <code>Marker</code> parameter in a subsequent request.

Truncatedboolean

A flag that indicates whether there are more items in the list. When this value is true, the list in this response is truncated. To get more items, pass the value of the <code>NextMarker</code> element in thisresponse to the <code>Marker</code> parameter in a subsequent request.

Example response

{
  "Aliases": [
    {
      "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/acm",
      "AliasName": "alias/aws/acm",
      "TargetKeyId": "da03f6f7-d279-427a-9cae-de48d07e5b66"
    },
    {
      "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/ebs",
      "AliasName": "alias/aws/ebs",
      "TargetKeyId": "25a217e7-7170-4b8c-8bf6-045ea5f70e5b"
    },
    {
      "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/rds",
      "AliasName": "alias/aws/rds",
      "TargetKeyId": "7ec3104e-c3f2-4b5c-bf42-bfc4772c6685"
    },
    {
      "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/redshift",
      "AliasName": "alias/aws/redshift",
      "TargetKeyId": "08f7a25a-69e2-4fb5-8f10-393db27326fa"
    },
    {
      "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/aws/s3",
      "AliasName": "alias/aws/s3",
      "TargetKeyId": "d2b0f1a3-580d-4f79-b836-bc983be8cfa5"
    },
    {
      "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example1",
      "AliasName": "alias/example1",
      "TargetKeyId": "4da1e216-62d0-46c5-a7c0-5f3a3d2f8046"
    },
    {
      "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example2",
      "AliasName": "alias/example2",
      "TargetKeyId": "f32fef59-2cc2-445b-8573-2d73328acbee"
    },
    {
      "AliasArn": "arn:aws:kms:us-east-2:111122223333:alias/example3",
      "AliasName": "alias/example3",
      "TargetKeyId": "1374ef38-d34e-4d5f-b2c9-4e0daee38855"
    }
  ],
  "Truncated": false
}