A logistics enterprise uses AWS Organizations to manage a multi-account environment. The production application runs on a fleet of Amazon EC2 instances in a production account. The application logs are written to `/var/log/app/production-active.log` and are rotated hourly by renaming the active file to `/var/log/app/production-YYYYMMDD-HH.log` before creating a new active log file. The enterprise also wants to centralize AWS CloudTrail logs from all organization accounts into an Amazon S3 bucket in a dedicated Logging account. A Solutions Architect is tasked with designing a highly secure, reliable logging architecture that ensures zero log loss for the application logs during rotation and successful centralized delivery of CloudTrail logs. Which combination of configurations should the Solutions Architect implement?
- AConfigure the Unified CloudWatch Agent on the EC2 instances with the log file path set to `/var/log/app/production-active.log`. In the Logging account, configure the S3 bucket policy to grant `s3:PutObject` permissions to the AWS Organizations principal (`organizations.amazonaws.com`) and include a condition checking that the `aws:PrincipalOrgID` matches the organization's ID.
- BConfigure the Unified CloudWatch Agent on the EC2 instances with the log file path set to `/var/log/app/production-active.log`. In the Logging account, configure the S3 bucket policy to grant `s3:PutObject` permissions to the IAM roles of all member accounts in the organization, using a wildcard for the IAM principal ARN.
- Configure the Unified CloudWatch Agent on the EC2 instances with the log file path set to `/var/log/app/production-*.log`. In the Logging account, configure the S3 bucket policy to grant `s3:PutObject` permissions to the CloudTrail service principal (`cloudtrail.amazonaws.com`) and include a condition checking that the `aws:PrincipalOrgID` matches the organization's ID.Answer
- DConfigure the Unified CloudWatch Agent on the EC2 instances with the log file path set to `/var/log/app/production-*.log`. In the Logging account, configure the S3 bucket policy to grant `s3:PutObject` permissions to the CloudTrail service principal (`cloudtrail.amazonaws.com`) but omit any organizational condition, relying on the CloudTrail service to restrict access by default.