A medical technology company operates a critical patient telemetry application running on Amazon EC2 instances in an Auto Scaling group across multiple AWS member accounts. The application writes log data to `/var/log/telemetry/active.log`. Due to high write volume, these log files are rotated and renamed hourly to `/var/log/telemetry/active.log.YYYY-MM-DD-HH` using a local utility. The company needs to centralize these application logs into a single Amazon S3 bucket located in a dedicated monitoring account for long-term retention and security analysis. The solution must ensure that logs are continuously delivered even immediately after rotation, must support encryption at rest in the destination bucket using a customer-managed key, and must scale efficiently with minimum administrative overhead. Which solutions architecture meets these requirements?
- Install the unified Amazon CloudWatch agent on the EC2 instances. In the agent configuration, specify the log file path using the wildcard pattern `/var/log/telemetry/active.log*` to match the rotated files. Configure the agent to stream the logs to a local Amazon CloudWatch log group. Set up a CloudWatch subscription filter in each member account to stream the logs to an Amazon Kinesis Data Firehose delivery stream in the monitoring account, which writes the logs to the central S3 bucket using a Customer Managed KMS key for SSE-KMS encryption.Cevap
- BInstall the unified Amazon CloudWatch agent on the EC2 instances. In the agent configuration, specify the static log file path `/var/log/telemetry/active.log`. Configure the agent to stream the logs to a local Amazon CloudWatch log group, and configure a cron job on the instances to restart the CloudWatch agent service hourly immediately after the log rotation occurs. Use a CloudWatch subscription filter in each member account to stream the logs to an Amazon Kinesis Data Firehose delivery stream in the monitoring account, which writes them to the central S3 bucket encrypted with a Customer Managed KMS key.
- CInstall the unified Amazon CloudWatch agent on the EC2 instances. In the agent configuration, specify the log file path using the wildcard pattern `/var/log/telemetry/active.log*`. Configure the agent to write the logs directly to the central S3 bucket in the monitoring account. Enable SSE-KMS encryption on the bucket using the default AWS-managed key `aws/s3` in the monitoring account, and apply a bucket policy that grants cross-account write access to the EC2 IAM role without specifying an AWS Organizations condition.
- DConfigure Amazon CloudTrail in each member account to monitor the application log files on the EC2 instances and write the logs directly to the central S3 bucket in the monitoring account. Apply the default S3 bucket policy in the monitoring account, and ensure the CloudTrail service in each member account is authorized using the default AWS-managed KMS key `aws/s3` for cross-account encryption.