An S3 bucket policy permits the CloudTrail service principal to write logs, but the owner wants that permission usable only by one designated trail. Which condition on the service's allow statement most directly enforces this restriction?
Show the answer
Correct answerD. Require aws:SourceArn to equal the designated trail's ARN
AWhy not this: Principal organization membership does not identify which trail caused the CloudTrail service request.
BWhy not this: External IDs are used with role assumption, not CloudTrail's direct delivery to S3.
CWhy not this: The source account condition permits other trails in that account to satisfy the restriction.
DWhy this is right: Matching the source ARN restricts the service permission to requests originating from the designated trail.
For CloudTrail delivery, aws:SourceArn identifies the trail responsible for the request, allowing the bucket policy to restrict writes to that trail. aws:SourceAccount limits the source account but does not distinguish trails within that account.