A company is hosting a hybrid application on a fleet of self-managed Linux EC2 instances. The application writes its runtime logs to `/var/log/app/application.log`. These logs are rotated hourly using a log utility that renames the active file to `application.log.YYYY-MM-DD-HH` and creates a new empty `application.log` file. The solutions architect needs to centralize these application logs into an Amazon CloudWatch Logs group in a central Security account. Additionally, the solutions architect must configure a multi-account AWS CloudTrail trail to deliver management events from all AWS accounts in the AWS Organization to a centralized Amazon S3 bucket in the same Security account. Which combination of actions should the solutions architect take to meet these requirements? (Select TWO.)
- Configure the CloudWatch agent on the EC2 instances using a wildcard path, such as `/var/log/app/application.log*`, in the `file_path` parameter of the agent configuration file to ensure all rotated log files are tracked and ingested.Answer
- Configure the S3 bucket policy in the Security account to grant the `cloudtrail.amazonaws.com` service principal `s3:PutObject` permissions, and use the `aws:PrincipalOrgID` condition key to allow log delivery from the organization's member accounts.Answer
- CConfigure the CloudWatch agent on the EC2 instances with the static file path `/var/log/app/application.log` in the `file_path` parameter, relying on the agent's file descriptor tracking to automatically monitor rotated log files.
- DConfigure the S3 bucket policy in the Security account to grant `s3:PutObject` permissions to the IAM roles of all member accounts in the organization, enabling the local CloudTrail service in each account to write logs directly to the bucket.
- EAttach a Service Control Policy (SCP) to the organization's root that grants the CloudTrail service principal in all member accounts permission to perform `s3:PutObject` on the centralized S3 bucket in the Security account.