的資源型政策範例 AWS Audit Manager - AWS Audit Manager

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

的資源型政策範例 AWS Audit Manager

Amazon S3 儲存貯體政策

下列政策允許 CloudTrail 將證據搜尋工具的查詢結果傳遞到指定的 S3 儲存貯體。作為安全最佳實務,IAM 全域條件索引鍵 aws:SourceArn 有助於確保 CloudTrail 僅針對事件資料存放區寫入 S3 儲存貯體。

重要

您必須為 CloudTrail Lake 查詢結果交付指定 S3 儲存貯體。如需詳細資訊,請參閱指定 CloudTrail Lake 查詢結果的現有儲存貯體。

以您自己的資訊取代預留位置文字,如下所示:

  • amzn-s3-demo-destination-bucket 取代為您用作匯出目的地的 S3 儲存貯體。

  • 以 AWS 區域 適合您的組態取代 myQueryRunningRegion

  • 以用於 CloudTrail 的 AWS 帳戶 ID 取代 myAccountID。這可能與 S3 儲存貯體的 AWS 帳戶 ID 不同。如果這是組織事件資料存放區,您必須使用管理帳戶的 AWS 帳戶 。

JSON
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "cloudtrail.amazonaws.com" }, "Action": [ "s3:PutObject*", "s3:Abort*" ], "Resource": [ "arn:aws:s3:::amzn-s3-demo-destination-bucket", "arn:aws:s3:::amzn-s3-demo-destination-bucket/*" ], "Condition": { "StringEquals": { "aws:SourceArn": "arn:aws:cloudtrail:myQueryRunningRegion:myAccountID:eventdatastore/*" } } }, { "Effect": "Allow", "Principal": { "Service": "cloudtrail.amazonaws.com" }, "Action": "s3:GetBucketAcl", "Resource": "arn:aws:s3:::amzn-s3-demo-destination-bucket", "Condition": { "StringEquals": { "aws:SourceArn": "arn:aws:cloudtrail:myQueryRunningRegion:myAccountID:eventdatastore/*" } } } ] }

AWS Key Management Service 政策

如果您的 S3 儲存貯體的預設加密設定為 SSE-KMS,請在 AWS Key Management Service 金鑰的資源政策中授予對 CloudTrail 的存取權,以便其可以使用金鑰。在此情況下,請將下列資源政策新增至 AWS KMS 金鑰。

JSON
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "cloudtrail.amazonaws.com" }, "Action": [ "kms:Decrypt*", "kms:GenerateDataKey*" ], "Resource": "*" }, { "Effect": "Allow", "Principal": { "Service": "s3.amazonaws.com" }, "Action": [ "kms:Decrypt*", "kms:GenerateDataKey*" ], "Resource": "*" } ] }