基于资源的策略示例 AWS Audit Manager - Amazon Audit Manager

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

基于资源的策略示例 AWS Audit Manager

Amazon S3 存储桶策略

以下策略允许 CloudTrail 将证据查找器查询结果传送到指定的 S3 存储桶。作为安全最佳实践,IAM 全局条件密钥aws:SourceArn有助于确保仅针对事件数据存储 CloudTrail 写入 S3 存储桶。

重要

您必须为 La CloudTrail ke 查询结果的交付指定 S3 存储桶。有关更多信息,请参阅为 CloudTrail Lake 查询结果指定现有存储桶

placeholder text用您自己的信息替换,如下所示:

  • amzn-s3-demo-destination-bucket替换为您用作导出目标的 S3 存储桶。

  • myQueryRunningRegion替换 AWS 区域 为适合您的配置的。

  • myAccountID替换为用于的 AWS 账户 ID CloudTrail。这可能与 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": "*" } ] }