An enterprise operates a delivery tracking application deployed across multiple AWS accounts managed under an AWS Organizations organization. The application is hosted on Amazon EC2 instances within Auto Scaling groups. The application writes operational logs locally to `/var/log/delivery/tracking.log`. The logs undergo hourly rotation, during which the active log file is renamed to `/var/log/delivery/tracking.log.YYYY-MM-DD-HH` and a new `tracking.log` is created.
The solutions architect must design a centralized, operationally excellent monitoring and logging architecture. The architecture must gather all application logs and deliver all AWS CloudTrail logs from all member accounts into a single Amazon S3 bucket located in a central security account.
Which combination of steps should the solutions architect take to meet these requirements while ensuring operational reliability and maintaining least-privilege security? (Select TWO.)
- Configure the S3 bucket policy in the central security account to grant `s3:PutObject` permissions to the CloudTrail service principal (`cloudtrail.amazonaws.com`), and use the `aws:PrincipalOrgID` condition key to restrict log delivery to only the accounts within the AWS Organization.Cevap
- In the Unified CloudWatch Agent configuration file on the EC2 instances, define the log source with the `file_path` parameter set to `/var/log/delivery/tracking.log*` to ensure both the active log and the rotated log files are monitored and streamed.Cevap
- CIn the Unified CloudWatch Agent configuration file on the EC2 instances, set the `file_path` to `/var/log/delivery/tracking.log` and schedule a cron job to restart the CloudWatch agent service hourly immediately after the log rotation occurs.
- DAttach an AWS Organizations Service Control Policy (SCP) to the organization root that allows `s3:PutObject` on the central S3 bucket, and configure the central S3 bucket policy with a wildcard principal (`*`) to inherit permissions from the SCP.
- EIn the Unified CloudWatch Agent configuration file on the EC2 instances, set the `file_path` to `/var/log/delivery/tracking.log` and set the `publish_multi_line_logs` parameter to `true` to force the agent to follow historical file rotations.