An enterprise runs a critical application on a fleet of Amazon EC2 instances across multiple member accounts in an AWS Organization. The application writes operational logs to `/var/log/myapp/app-[timestamp].log`. Every hour, a cron job rotates these logs, compressing the older logs into `/var/log/myapp/app-[timestamp].log.gz` within the same directory. The company wants to implement a centralized logging architecture to stream these logs to a central Amazon S3 bucket in a dedicated monitoring account. The Solutions Architect must ensure that the CloudWatch agent on the EC2 instances collects all log entries continuously without ingesting duplicate data from the compressed files, and the logs are securely forwarded to the central S3 bucket with the least privilege, avoiding cross-account IAM role assumption from the EC2 instances. Which of the following actions should the Solutions Architect take to meet these requirements? (Select TWO.)
- In the CloudWatch agent configuration file on the EC2 instances, set the `file_path` parameter to `/var/log/myapp/app-*.log` under the logs collection section.Answer
- BIn the CloudWatch agent configuration file on the EC2 instances, set the `file_path` parameter to `/var/log/myapp/app-*` under the logs collection section.
- In the monitoring account, create an Amazon Kinesis Data Firehose delivery stream and a CloudWatch Logs destination. Attach an IAM role to the destination allowing it to write to the Firehose stream, and apply a destination policy that permits `logs:PutSubscriptionFilter` for the AWS Organization. In the member accounts, create subscription filters that target the centralized Logs destination.Answer
- DIn the monitoring account, configure the central Amazon S3 bucket policy to grant `s3:PutObject` access directly to the IAM roles attached to the EC2 instances in the member accounts, and configure the CloudWatch agent on the EC2 instances to stream logs directly to the S3 bucket.
- EIn each member account, configure a CloudWatch Logs subscription filter to send logs directly to the central Amazon S3 bucket, and update the S3 bucket policy in the monitoring account to allow the `logs.amazonaws.com` service principal to perform `s3:PutObject` actions.