Get Hands-on with Amazon EKS - Workshop Event Series
Whether you're taking your first steps with Kubernetes or you're an experienced practitioner looking to sharpen your skills, our Amazon EKS workshop series delivers practical, real-world experience that moves you forward. Learn directly from AWS solutions architects and EKS specialists through hands-on sessions designed to build your confidence with Kubernetes. Register now and start building with Amazon EKS!
CloudTrail の証跡を AWS Organizations 用の証跡に変更する方法を教えてください。
新しい AWS Organizations 用の組織証跡を作成せずに、既存の AWS CloudTrail 証跡を組織証跡に変更したいです。CloudTrail の証跡を組織証跡に変更する方法を教えてください。
解決策
(前提条件) CloudTrail で信頼されたサービスへのアクセスを有効にする
AWS Organizations ユーザーガイドの「CloudTrail で信頼されたアクセスを有効化する」の手順に従ってください。
CloudTrail を Organizations に統合する方法の詳細については、「AWS CloudTrail と AWS Organizations」を参照してください。
CloudTrail ログファイルの Amazon S3 バケットポリシーを更新し、次の証跡を許可します。
- Amazon Simple Storage Service (Amazon S3) バケットにログファイルを配信する CloudTrail 証跡。
- 組織内のアカウントのログを Amazon S3 バケットに配信する CloudTrail 証跡。
- Amazon S3 コンソールを開きます。
2.[バケット] を選択します。
3.[バケット名] で CloudTrail ログファイルを含む S3 バケットを選択します。
4.[アクセス許可] を選択します。次に、[バケットポリシー] を選択します。
5.次のバケットポリシーステートメントの例をコピーしてポリシーエディタに貼り付け、[保存] を選択します。
重要: primary-account-id は、お使いのプライマリ Organizations アカウント ID に置き換えます。bucket-name は、実際の S3 バケット名に置き換えます。org-id は、お使いの Organizations ID に置き換えます。your-region は、お使いの AWS リージョンに置き換えます。
{ "Version": "2012-10-17", "Statement": [ { "Sid": "AWSCloudTrailAclCheck", "Effect": "Allow", "Principal": { "Service": "cloudtrail.amazonaws.com" }, "Action": "s3:GetBucketAcl", "Resource": "arn:aws:s3:::bucket-name" }, { "Sid": "AWSCloudTrailWrite20150319", "Effect": "Allow", "Principal": { "Service": "cloudtrail.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::bucket-name/AWSLogs/primary-account-id/*", "Condition": { "StringEquals": { "s3:x-amz-acl": "bucket-owner-full-control" } } }, { "Sid": "AWSCloudTrailWrite", "Effect": "Allow", "Principal": { "Service": "cloudtrail.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::bucket-name/AWSLogs/org-id/*", "Condition": { "StringEquals": { "s3:x-amz-acl": "bucket-owner-full-control" } } } ] }
(オプション) CloudWatch Logs を使用して組織の CloudTrail ログファイルを監視するためのアクセス許可を設定します。
注: 次のステップは、Amazon CloudWatch Logs を使用して CloudTrail ログファイルを監視する場合にのみ必要です。
1.組織ですべての機能が有効になっていることを確認してください。
2.「AWS Organizations で、CloudTrail を信頼されたサービスとして有効にする」の手順を実行します。
3.AWS Identity and Access Management (IAM) コンソールを開きます。
4.**[ポリシー]**を選択します。
5.[ポリシー名] には、CloudWatch ロググループの AWS プライマリアカウントに関連付けられた IAM ポリシーを選択します。
6.[ポリシーの編集] を選択し、次の IAM ポリシーステートメントの例をコピーして貼り付け、[保存] を選択します。
重要: your-region は、お使いの AWS リージョンに置き換えます。primary-account-id は、Organizations のプライマリアカウント ID に置き換えます。org-id は、お使いの組織 ID に置き換えます。log-group-name は、CloudWatch ロググループ名に置き換えます。
{ "Version": "2012-10-17", "Statement": [ { "Sid": "AWSCloudTrailCreateLogStream", "Effect": "Allow", "Action": [ "logs:CreateLogStream" ], "Resource": [ "arn:aws:logs:your-region:primary-account-id:log-group:CloudTrail/log-group-name:log-stream:primary-account-id_CloudTrail_your-region*", "arn:aws:logs:your-region:primary-account-id:log-group:CloudTrail/log-group-name:log-stream:org-id*" ] }, { "Sid": "AWSCloudTrailPutLogEvents", "Effect": "Allow", "Action": [ "logs:PutLogEvents" ], "Resource": [ "arn:aws:logs:your-region:primary-account-id:log-group:CloudTrail/log-group-name:log-stream:primary-account-id_CloudTrail_your-region*", "arn:aws:logs:your-region:primary-account-id:log-group:CloudTrail/log-group-name:log-stream:org-id*" ] } ] }
7.CloudTrail コンソールを開きます。
8.ナビゲーションペインで [証跡] を選択します。
9.[証跡名] に証跡名を入力します。
10.[Cloudwatch] のログで [編集] アイコンをクリックします。次に [続行] を選択します。
11.[ロールの概要] で [許可] を選択します。
CloudTrail の証跡を組織証跡に更新する
1.CloudTrail コンソールを開き、ナビゲーションペインで [証跡] を選択します。
2.[証跡名] でお使いの証跡を選択します。
3.[証跡設定] で [編集] アイコンをクリックします。
4.[組織に証跡を適用] で [Yes] を選択します。次に、[保存] を選択します。
関連情報
- 言語
- 日本語

関連するコンテンツ
- 質問済み 8ヶ月前
