Soru

Zorluk: OrtaAWS CloudTrail Configuration and Management

A SysOps Administrator is configuring an AWS CloudTrail organization trail from the organization's management account to log all API activity across all member accounts. The trail is configured to deliver logs to a centralized Amazon S3 bucket. While logs from the management account are successfully appearing in the S3 bucket, no logs from the member accounts are being delivered. Which of the following is the most likely cause of this issue?

  1. The S3 bucket policy restricts the s3:PutObject permission to the resource path prefix containing the management account ID instead of the AWS Organization ID.Cevap
  2. B
    The S3 bucket policy is missing the s3:GetBucketAcl permission for the cloudtrail.amazonaws.com service principal.
  3. C
    The IAM policy associated with the SysOps Administrator in the management account is missing the iam:PassRole permission to pass the CloudTrail service role to member accounts.
  4. D
    An Amazon EventBridge rule must be created in each member account to forward the CloudTrail log events to the central management account's S3 bucket.

Cevap

The S3 bucket policy restricts the s3:PutObject permission to the resource path prefix containing the management account ID instead of the AWS Organization ID.
The correct answer is that the S3 bucket policy restricts the s3:PutObject permission to the resource path prefix containing the management account ID instead of the AWS Organization ID. When an organization trail is created, CloudTrail writes log files from member accounts to the S3 bucket under the prefix 'AWSLogs/o-organizationId/'. If the S3 bucket policy only grants 's3:PutObject' access to the path prefix containing the management account ID, log delivery for all other member accounts will be blocked, while the management account's logs might still be delivered if a specific rule allowed them.

Adım Adım Çözüm

1
Analyze the log delivery path for an AWS CloudTrail organization trail.
For organization trails, the log files are delivered to the S3 bucket under the path format: 'arn:aws:s3:::bucket-name/AWSLogs/o-organizationId/accountID/'. For non-organization trails or the management account's own local trail, it is 'arn:aws:s3:::bucket-name/AWSLogs/management-accountId/'.
This determines the resource prefix matching rules in the S3 bucket policy.
2
Examine the S3 bucket policy permissions required for CloudTrail.
The bucket policy must allow the 'cloudtrail.amazonaws.com' service principal to perform 's3:PutObject'. The Resource array must cover the path used by all member accounts under the organization, which is 'arn:aws:s3:::bucket-name/AWSLogs/o-organizationId/*'.
If the policy only allows writes to 'arn:aws:s3:::bucket-name/AWSLogs/management-accountId/*', CloudTrail will fail to deliver logs for any of the member accounts.
3
Verify correct remediation action.
Updating the S3 bucket policy to allow 's3:PutObject' on 'arn:aws:s3:::bucket-name/AWSLogs/o-organizationId/*' resolves the log delivery issue for member accounts.
This correctly aligns S3 bucket access permissions with the path layout used by CloudTrail organization trails.

Anahtar Kavram

AWS CloudTrail Organization Trail S3 Bucket Policies
Bu soruyu puanla