

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 請求配額
<a name="requests-per-second"></a>

AWS KMS 會為每秒請求的 API 操作數量建立配額。請求配額會因 API 操作、 AWS 區域和其他因素而有所不同，例如 KMS 金鑰類型。當您超過 API 請求配額時， AWS KMS [會調節請求](throttling.md)。

所有 AWS KMS 請求配額都是可調整的，但[AWS CloudHSM 金鑰存放區請求配額](#rps-key-stores)除外。若要請求提高配額，請參閱[《Service Quotas 使用者指南》](https://docs.aws.amazon.com/servicequotas/latest/userguide/request-increase.html)中的*請求提高配額*。若要請求減少配額、變更 Service Quotas 中未列出的配額，或在 AWS KMS 無法使用 AWS 區域 Service Quotas 的 中變更配額，請造訪 [AWS 支援 中心](https://console.aws.amazon.com/support/home)並建立案例。

如果正在超出 [GenerateDataKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey.html) 操作的請求配額，請考慮使用 AWS Encryption SDK的[資料金鑰快取](https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/data-key-caching.html)功能。重複使用資料金鑰可能會降低請求的頻率 AWS KMS。

除了請求配額之外， AWS KMS 還會使用資源配額來確保所有使用者的容量。如需詳細資訊，請參閱[資源配額](resource-limits.md)。

若要檢視請求率的趨勢，請使用 [Service Quotas 主控台](https://console.aws.amazon.com/servicequotas)。您也可以建立 [Amazon CloudWatch](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/) 警示，在您的請求率達到配額值的特定百分比時發出提醒。如需詳細資訊，請參閱 *AWS 安全部落格*中的[使用 Service Quotas 和 Amazon CloudWatch 管理您的 AWS KMS API 請求率](https://aws.amazon.com/blogs/security/manage-your-aws-kms-api-request-rates-using-service-quotas-and-amazon-cloudwatch/)。

**Topics**
+ [請求每個 AWS KMS API 操作的配額](#rps-table)
+ [套用請求配額](#about-rate-limits)
+ [密碼編譯操作的共用配額](#rps-shared-limit)
+ [代表您進行的 API 請求](#rps-from-service)
+ [跨帳戶請求](#rps-cross-account)
+ [自訂金鑰存放區請求配額](#rps-key-stores)

## 請求每個 AWS KMS API 操作的配額
<a name="rps-table"></a>

此資料表列出 [Service Quotas](https://docs.aws.amazon.com/servicequotas/latest/userguide/) 配額代碼，以及每個 AWS KMS 請求配額的預設值。所有 AWS KMS 請求配額都是可調整的，但[AWS CloudHSM 金鑰存放區請求配額](#rps-key-stores)除外。

**注意**  
您可能需要水平或垂直捲動，才能查看此資料表中的所有資料。


| 配額名稱 | 預設值 (每秒請求數) | 
| --- | --- | 
|  `Cryptographic operations (symmetric) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  這些共用配額會隨 AWS 區域 和請求中使用的 KMS 金鑰類型而有所不同。每個配額會分別計算。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  | 
| `Cryptographic operations (RSA) request rate` 適用對象：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html) |  RSA KMS 金鑰 1，000 （共用）  | 
| `Cryptographic operations (ML-DSA) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html) | ML-DSA KMS 金鑰 1，000 （共用） | 
| `Cryptographic operations (ECC and SM2) request rate` 適用對象：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html) |  1，000 （共用） 代表橢圓曲線 (ECC) 和 SM2 （僅限中國區域） KMS 金鑰  | 
|  `Custom key store request quotas` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  | 會針對每個自訂金鑰存放區分別計算[自訂金鑰存放區請求配額](#rps-key-stores)[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html) | 
| `CancelKeyDeletion request rate` | 5 | 
| `ConnectCustomKeyStore request rate` | 5 | 
| `CreateAlias request rate` | 5 | 
| `CreateCustomKeyStore request rate` | 5 | 
| `CreateGrant request rate` | 50 | 
| `CreateKey request rate` | 5 | 
| `DeleteAlias request rate` | 15 | 
| `DeleteCustomKeyStore request rate` | 5 | 
| `DeleteImportedKeyMaterial request rate` | 15 | 
| `DescribeCustomKeyStores request rate` | 5 | 
| `DescribeKey request rate` | 2000 | 
| `DisableKey request rate` | 5 | 
| `DisableKeyRotation request rate` | 5 | 
| `DisconnectCustomKeyStore request rate` | 5 | 
| `EnableKey request rate` | 5 | 
| `EnableKeyRotation request rate` | 15 | 
|  `GenerateDataKeyPair (ECC_NIST_P256) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  100  | 
|  `GenerateDataKeyPair (ECC_NIST_P384) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  100  | 
|  `GenerateDataKeyPair (ECC_NIST_P521) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  100  | 
|  `GenerateDataKeyPair (ECC_SECG_P256K1) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  100  | 
|  `GenerateDataKeyPair (ECC_NIST_EDWARDS25519) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  100  | 
|  `GenerateDataKeyPair (RSA_2048) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  20  | 
|  `GenerateDataKeyPair (RSA_3072) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  4  | 
|  `GenerateDataKeyPair (RSA_4096) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  1  | 
|  `GenerateDataKeyPair (SM2 — China Regions only) request rate` 適用對象： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/kms/latest/developerguide/requests-per-second.html)  |  25  | 
| `GetKeyPolicy request rate` | 1000 | 
| `GetKeyRotationStatus request rate` | 1000 | 
| `GetParametersForImport request rate` | 1 | 
| `GetPublicKey request rate` | 2000 | 
| `ImportKeyMaterial request rate` | 15 | 
| `ListAliases request rate` | 500 | 
| `ListGrants request rate` | 100 | 
| `ListKeyPolicies request rate` | 100 | 
| `ListKeys request rate` | 500 | 
| `ListKeyRotations request rate` | 100 | 
| `ListResourceTags request rate` | 2000 | 
| `ListRetirableGrants request rate` | 100 | 
| `PutKeyPolicy request rate` | 15 | 
| ReplicateKey request rate `ReplicateKey` 操作在主要金鑰的區域中計為一個 `ReplicateKey` 請求，在複本區域中計為兩個 `CreateKey` 請求。其中一個 `CreateKey` 請求是試執行，以在建立金鑰之前偵測潛在的問題。 | 5 | 
| `RetireGrant request rate` | 50 | 
| `RevokeGrant request rate` | 50 | 
| `RotateKeyOnDemand request rate` | 5 | 
| `ScheduleKeyDeletion request rate` | 15 | 
| `TagResource request rate` | 10 | 
| `UntagResource request rate` | 5 | 
| `UpdateAlias request rate` | 5 | 
| `UpdateCustomKeyStore request rate` | 5 | 
| `UpdateKeyDescription request rate` | 5 | 
| `UpdatePrimaryRegion request rate` `UpdatePrimaryRegion` 操作會計為兩個 `UpdatePrimaryRegion` 請求；每兩個受影響的區域中一個請求。  | 5 | 

## 套用請求配額
<a name="about-rate-limits"></a>

檢閱請求配額時，請注意以下資訊。
+ 請求配額同時適用於[客戶受管金鑰](concepts.md#customer-mgn-key)和 [AWS 受管金鑰](concepts.md#aws-managed-key)。使用 [AWS 擁有的金鑰](concepts.md#aws-owned-key) 不會計入您 的請求配額 AWS 帳戶，即使它們用於保護您帳戶中的資源。
+ 請求配額適用於傳送至 FIPS 端點和非 FIPS 端點的請求。如需 AWS KMS 服務端點的清單，請參閱 中的[AWS Key Management Service 端點和配額](https://docs.aws.amazon.com/general/latest/gr/kms.html) AWS 一般參考。
+ 調節是以區域中所有類型 KMS 金鑰的所有請求為基礎。此總計包含來自 中所有主體的請求 AWS 帳戶，包括代表您來自 AWS 服務的請求。
+ 每個請求配額都是獨立計算的。例如，[CreateKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html) 操作的請求不會對 [CreateAlias](https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateAlias.html) 操作的請求配額產生任何影響。如果您的 `CreateAlias` 請求遭到調節，您的 `CreateKey` 請求仍然可以成功完成。
+ 雖然密碼編譯操作會共用配額，但是共用的配額會獨立於其他操作配額之外進行計算。例如，對 [Encrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) 和 [Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) 操作的呼叫會共用請求配額，但是該配額是獨立於管理操作 (例如 [EnableKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_EnableKey.html)) 的配額之外。例如，在歐洲 (倫敦) 區域，您可以在對稱 KMS 金鑰上執行 10,000 次密碼編譯操作，*加上*每秒 5 次 `EnableKey` 操作，而仍不會遭到調節。

## 密碼編譯操作的共用配額
<a name="rps-shared-limit"></a>

AWS KMS [密碼編譯操作](kms-cryptography.md#cryptographic-operations)共用請求配額。您可以請求 KMS 金鑰所支援密碼編譯操作的任何組合，只要密碼編譯操作的總數不會超過該 KMS 金鑰類型的請求配額即可。例外狀況是 [GenerateDataKeyPair](https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyPair.html) 和 [GenerateDataKeyPairWithoutPlaintext](https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyPairWithoutPlaintext.html)，它們共用個別的配額。

不同 KMS 金鑰類型的配額也會獨立計算。每個配額適用於 AWS 帳戶 和 區域中這些操作的所有請求，每個 1 秒間隔具有指定的金鑰類型。
+ *密碼編譯操作 (對稱) 請求率*是帳戶和區域中使用對稱 KMS 金鑰進行加密編譯操作的共用請求配額。此配額適用於具有對稱加密金鑰和 HMAC 金鑰 (兩者皆為對稱金鑰) 的密碼編譯操作。

  例如，您可能在 中使用[對稱 KMS 金鑰](symm-asymm-choose-key-spec.md#symmetric-cmks)， AWS 區域 共用配額為每秒 10，000 個請求。當您每秒發出 7，000 個 [GenerateDataKey](https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey.html) 請求和每秒發出 2，000 [個解密](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html)請求時， AWS KMS 不會調節您的請求。但是，當您每秒發出 9,500 次 `GenerateDataKey` 請求及 1,000 次 [Encrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) 請求時， AWS KMS 便會進行調節，因為其超過了共用配額。

  [自訂金鑰存放區](key-store-overview.md#custom-key-store-overview)中[對稱加密 KMS 金鑰](symm-asymm-choose-key-spec.md#symmetric-cmks)的密碼編譯操作會計入帳戶的*密碼編譯操作 (對稱) 請求率*以及自訂金鑰存放區的[自訂金鑰存放區請求配額](#rps-key-stores)。
+ *密碼編譯操作 (RSA) 請求率*是使用 [RSA 非對稱 KMS 金鑰](symm-asymm-choose-key-spec.md#key-spec-rsa)進行加密編譯操作的共用請求配額。

  例如，請求配額為每秒 1，000 個操作，您可以使用可加密和[解密](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html)的 RSA KMS 金鑰發出 400 [個加密](https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html)請求和 200 個解密請求，加上 250 個 [Sign](https://docs.aws.amazon.com/kms/latest/APIReference/API_Sign.html) 請求和 150 個使用可簽署和驗證的 RSA KMS 金鑰[驗證](https://docs.aws.amazon.com/kms/latest/APIReference/API_Verify.html)請求。
+ *密碼編譯操作 (ECC) 請求率*是使用[橢圓曲線 (ECC) 非對稱 KMS 金鑰](symm-asymm-choose-key-spec.md#key-spec-ecc)和 [SM 非對稱 KMS 金鑰](symm-asymm-choose-key-spec.md#key-spec-sm)進行密碼編譯操作的共用請求配額。

  例如，如果請求配額為每秒 1，000 個操作，您可以使用可簽署和驗證的 ECC KMS 金鑰發出 400 個 Sign 請求和 200 個 Verify 請求，以及使用可簽署和驗證的 SM2 KMS 金鑰發出 250 個 [Sign](https://docs.aws.amazon.com/kms/latest/APIReference/API_Sign.html) 請求和 150 個 [Verify](https://docs.aws.amazon.com/kms/latest/APIReference/API_Verify.html) 請求。
+ *自訂金鑰存放區請求配額*是自訂金鑰存放區中 KMS 金鑰之密碼編譯操作的共用請求配額。此配額會針對每個自訂金鑰存放區分別計算。

  [自訂金鑰存放區](key-store-overview.md#custom-key-store-overview)中[對稱加密 KMS 金鑰](symm-asymm-choose-key-spec.md#symmetric-cmks)的密碼編譯操作會計入帳戶的*密碼編譯操作 (對稱) 請求率*以及自訂金鑰存放區的[自訂金鑰存放區請求配額](#rps-key-stores)。

不同金鑰類型的配額也會獨立計算。例如，在亞太區域 (新加坡) 區域中，如果使用對稱和非對稱 KMS 金鑰，您最多可以使用對稱 KMS 金鑰 (包括 HMAC 金鑰) 每秒進行 10,000 次呼叫，*加上*使用 RSA 非對稱 KMS 金鑰每秒進行最多 500 次額外的呼叫，再*加上*使用 ECC 型 KMS 金鑰每秒進行最多 300 次額外的請求。

## 代表您進行的 API 請求
<a name="rps-from-service"></a>

您可以直接提出 API 請求，或使用整合式 AWS 服務 AWS KMS 代表您向 提出 API 請求。此配額同時適用於這兩種請求。

例如，您可能將資料存放在使用伺服器端加密搭配 KMS 金鑰 (SSE-KMS) 的 Amazon S3 上。每次上傳或下載使用 SSE-KMS 加密的 S3 物件時，Amazon S3 都會 AWS KMS 代表您向 發出 `GenerateDataKey`（上傳） 或 `Decrypt`（下載） 請求。這些請求會計入您的配額，因此如果您超過每秒 5，500 個 （或 10，000 或 50，000 個，視您的 而定 AWS 區域) 上傳或下載使用 SSE-KMS 加密的 S3 物件，則 會 AWS KMS 調節請求。

## 跨帳戶請求
<a name="rps-cross-account"></a>

當一個 中的應用程式 AWS 帳戶 使用不同帳戶擁有的 KMS 金鑰時，稱為*跨帳戶請求*。對於跨帳戶請求， AWS KMS 會調節發出請求的帳戶，而不是擁有 KMS 金鑰的帳戶。例如，如果帳戶 A 中的應用程式使用帳戶 B 中的 KMS 金鑰，使用該 KMS 金鑰就會套用帳戶 A 中的配額。

## 自訂金鑰存放區請求配額
<a name="rps-key-stores"></a>

AWS KMS 在[自訂金鑰存放](key-store-overview.md#custom-key-store-overview)區中的 KMS 金鑰上維護[密碼編譯操作](kms-cryptography.md#cryptographic-operations)的請求配額。會針對每個自訂金鑰存放區分別計算這些請求配額。


| 自訂金鑰存放區請求配額 | 每個自訂金鑰存放區的預設值 (每秒請求數) | 可調整 | 
| --- | --- | --- | 
| [AWS CloudHSM 金鑰存放區](keystore-cloudhsm.md)請求配額 | 1800 | 否 | 
| [外部金鑰存放區](keystore-external.md)請求配額 | 1800 | 否 | 

**注意**  
AWS KMS [自訂金鑰存放區請求配額](#rps-key-stores)不會出現在 Service Quotas 主控台中。您無法使用 Service Quotas API 操作來檢視或管理這些配額。  
如果與 AWS CloudHSM 金鑰存放區相關聯的 AWS CloudHSM 叢集正在處理許多命令，包括與自訂金鑰存放區無關的命令，您可能會`ThrottlingException`以lower-than-expected速率取得 AWS KMS 。如果發生這種情況，請將請求率降低為 AWS KMS、減少不相關的負載，或為您的 AWS CloudHSM 金鑰存放區使用專用 AWS CloudHSM 叢集。  
AWS KMS 會報告 [`ExternalKeyStoreThrottle`](monitoring-cloudwatch.md#metric-throttling) CloudWatch 指標中外部金鑰存放區請求的限流。您可以使用此指標來檢視限流模式、建立警示以及調整外部金鑰存放區請求配額。

自訂金鑰存放區 KMS 金鑰的[密碼編譯操作](kms-cryptography.md#cryptographic-operations)請求會計入兩個配額：
+ 密碼編譯操作 (對稱) 請求率配額 (每個帳戶)

  自訂金鑰存放區中 KMS 金鑰的密碼編譯操作請求會計入每個 AWS 帳戶 和區域的 `Cryptographic operations (symmetric) request rate` 配額。例如，在美國東部 （維吉尼亞北部） (us-east-1)，每個 對對稱加密 KMS 金鑰每秒 AWS 帳戶 最多可以有 100，000 個請求，包括在自訂金鑰存放區中使用 KMS 金鑰的請求。
+ 自訂金鑰存放區請求配額 (每個自訂金鑰存放區)

  自訂金鑰存放區中 KMS 金鑰的密碼編譯操作請求也會計入每秒 1,800 次 `Custom key store request quota` 操作中。會針對每個自訂金鑰存放區分別計算這些配額。它們可能包括來自多個 AWS 帳戶 在自訂金鑰存放區中使用 KMS 金鑰的請求。

例如，美國東部 （維吉尼亞北部） (us-east-1) 區域中自訂金鑰存放區 （任一類型） 中 KMS 金鑰的[加密](https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html)操作會計入其`Cryptographic operations (symmetric) request rate`帳戶和區域的帳戶層級配額 （每秒 100，000 個請求），以及自訂金鑰存放區的 `Custom key store request quota`（每秒 1，800 個請求）。不過，針對自訂金鑰存放區中 KMS 金鑰的管理操作 (例如 [PutKeyPolicy](https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html)) 的請求只會套用至其帳戶層級配額 (每秒 15 個請求)。