A SysOps Administrator is setting up an AWS CloudTrail organization trail in the management account (account ID 111122223333) to log all API activity across all accounts in an AWS Organization (org ID o-exampleorg12). The administrator creates a centralized S3 bucket named org-audit-logs-bucket in the management account.
The S3 bucket policy is configured as follows:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AWSCloudTrailAclCheck",
"Effect": "Allow",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "s3:GetBucketAcl",
"Resource": "arn:aws:s3:::org-audit-logs-bucket"
},
{
"Sid": "AWSCloudTrailWrite",
"Effect": "Allow",
"Principal": {
"Service": "cloudtrail.amazonaws.com"
},
"Action": "s3:PutObject",
"Resource": "arn:aws:s3:::org-audit-logs-bucket/AWSLogs/111122223333/*",
"Condition": {
"StringEquals": {
"s3:x-amz-acl": "bucket-owner-full-control"
}
}
}
]
}
After creating the organization trail, the administrator notices that logs from the management account are successfully delivered, but no logs are appearing for any of the member accounts in the organization. How should the SysOps Administrator modify the configuration to ensure logs from all member accounts are successfully delivered?
- AModify the AWSCloudTrailWrite statement condition to use aws:PrincipalOrgID matching o-exampleorg12 while retaining only the management account log path in the Resource element.
- BModify the key policy of the AWS managed key aws/s3 to allow kms:GenerateDataKey permissions for the cloudtrail.amazonaws.com service principal.
- Modify the S3 bucket policy's AWSCloudTrailWrite statement to include arn:aws:s3:::org-audit-logs-bucket/AWSLogs/o-exampleorg12/* in the Resource element.Answer
- DCreate a new IAM role in each member account with trust relationships configured for CloudTrail, and delegate s3:PutObject permission to those roles to write directly to the S3 bucket.