選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

授權 EventBridge 使用 客戶受管金鑰

焦點模式
授權 EventBridge 使用 客戶受管金鑰 - Amazon EventBridge

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

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

如果您在 客戶受管金鑰 帳戶中使用 來保護您的 EventBridge 資源, 上的政策 KMS key 必須授予代表您使用 資源的 EventBridge 許可。您可以在金鑰政策中提供這些許可。

EventBridge 不需要額外的授權,即可使用預設值 AWS 擁有的金鑰 來保護您 AWS 帳戶中 EventBridge 的資源。

EventBridge 需要下列許可才能使用 客戶受管金鑰:

  • kms:DescribeKey

    EventBridge 需要此許可,才能擷取所提供金鑰 ID 的 KMS key ARN,並確認金鑰是對稱的。

  • kms:GenerateDataKey

    EventBridge 需要此許可,才能產生資料金鑰做為資料的加密金鑰。

  • kms:Decrypt

    EventBridge 需要此許可,才能解密已加密的資料金鑰,並使用加密的資料存放。

    EventBridge 會使用此項目進行事件模式比對;使用者永遠無法存取資料。

AWS KMS 事件匯流排的金鑰政策

下列範例金鑰政策提供事件匯流排的必要許可:

  • kms:DescribeKey

  • kms:GenerateDataKey

  • kms:Decrypt

{ "Sid": "Allow EventBridge to encrypt events", "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Action": [ "kms:DescribeKey", "kms:GenerateDataKey", "kms:Decrypt" ] "Resource": "*", "Condition": { "StringEquals": { "kms:EncryptionContext:aws:events:event-bus:arn": "arn:aws:events:region:account-id:event-bus/event-bus-arn", "aws:SourceArn": "arn:aws:events:region:account-id:event-bus/event-bus-name" } } }

AWS KMS EventBridge 管道的金鑰政策

下列範例金鑰政策提供管道所需的許可:

  • kms:DescribeKey

  • kms:GenerateDataKey

  • kms:Decrypt

{ "Id": "CMKKeyPolicy", "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::account-id:role/pipe-execution-role" }, "Action": [ "kms:GenerateDataKey", "kms:Decrypt", "kms:DescribeKey" ], "Resource": "*", "Condition": { "ArnLike": { "kms:EncryptionContext:aws:pipe:arn": "arn:aws:pipes:region:account-id:pipe/pipe-name" }, "ForAnyValues:StringEquals": { // Requires that only PipeArn is passed in the encryption context "kms:EncryptionContextKeys": [ "aws:pipe:arn" ] } } } ] }

包含執行資料的管道日誌許可

如果您已將管道記錄設定為包含執行資料,則金鑰政策必須包含記錄服務的下列許可:

  • kms:Decrypt

  • kms:GenerateDataKey

如需詳細資訊,請參閱在 EventBridge 管道記錄中包含執行資料

下列範例金鑰政策提供管道記錄的必要許可:

{ "Sid": "Enable log service encryption", "Effect": "Allow", "Principal": { "Service": "delivery.logs.amazonaws.com" }, "Action": [ "kms:Decrypt", "kms:GenerateDataKey" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:SourceArn": "arn:partition:logs:region:account:*" } } }

此外,管道執行角色需要 kms:GenerateDataKey 許可。

{ "Sid": "Enable log service encryption", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::account:role/pipe-execution-role" }, "Action": [ "kms:GenerateDataKey" ], "Resource": "*", "Condition": { "StringLike": { "kms:EncryptionContext:SourceArn": "arn:partition:logs:region:account:*" } } }

管道執行角色也應包含:

"Action": [ "kms:GenerateDataKey" ], "Resource": "key-arn", "Condition": { "StringLike": { "kms:EncryptionContext:SourceArn": "arn:partition:logs:region:account:*" } }

使用 客戶受管金鑰 進行 EventBridge 事件匯流排加密時的安全性

作為安全最佳實務,請將 aws:SourceArnaws:sourceAccountkms:EncryptionContext:aws:events:event-bus:arn條件金鑰新增至 AWS KMS 金鑰政策。 IAM 全域條件金鑰有助於確保 EventBridge 僅對指定的匯流排或帳戶使用 KMS 金鑰。

下列範例示範如何在 IAM 政策中遵循此最佳實務:

{ "Sid": "Allow the use of key", "Effect": "Allow", "Principal": { "Service": "events.amazonaws.com" }, "Action": [ "kms:GenerateDataKey", "kms:Decrypt" ], "Resource": "*", "Condition" : { "StringEquals": { "aws:SourceAccount": "arn:aws:events:region:account-id", "aws:SourceArn": "arn:aws:events:region:account-id:event-bus/event-bus-name", "kms:EncryptionContext:aws:events:event-bus:arn": "arn:aws:events:region:account-id:event-bus/event-bus-arn" } }
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。