Soru

Zorluk: KolayImproving Operational Excellence via Monitoring and Logging

A company is configuring centralized logging and monitoring for its multi-account environment managed by AWS Organizations. The goal is to collect application logs from Amazon EC2 instances in various application accounts and deliver them to a central S3 bucket in a dedicated Security account. On the EC2 instances, the application logs are rotated hourly. Additionally, the company needs to collect memory utilization metrics from the EC2 instances. Which two configurations are required to meet these requirements?

  1. Configure the Unified CloudWatch Agent on the EC2 instances using a wildcard path pattern such as /var/log/app/*.log to capture both active and rotated logs, and include the memory metrics under the metrics section of the agent configuration file.Cevap
  2. Apply a bucket policy to the centralized S3 bucket in the Security account that grants s3:PutObject permissions to the application accounts, specifying a condition that restricts access to the AWS Organization ID.Cevap
  3. C
    Configure the Unified CloudWatch Agent to monitor only the static path /var/log/app/current.log, assuming that the agent will automatically detect and follow the log rotation using default Linux file descriptors.
  4. D
    Configure the central S3 bucket with a bucket policy that grants read and write access to all principals, and use S3 block public access to prevent external access instead of specifying the Organization ID.
  5. E
    Enable encryption on the centralized S3 bucket using the default AWS-managed KMS key aws/s3 to automatically encrypt cross-account log objects sent from the application accounts.

Cevap

Configure the Unified CloudWatch Agent with wildcard paths and memory metrics, and apply an S3 bucket policy in the central security account allowing writes from the organization.
The correct configuration requires configuring the Unified CloudWatch Agent with wildcard path patterns to collect rotated logs and memory metrics, and applying a bucket policy on the centralized S3 bucket that permits write access to the AWS Organization's accounts using the organizational ID condition.

Adım Adım Çözüm

1
Configure the Unified CloudWatch Agent on the EC2 instances.
Memory metrics and rotated log files (using wildcard paths) are successfully published to CloudWatch Logs.
This is required because standard EC2 memory metrics are not sent to CloudWatch by default, and rotated logs will be missed if static file paths are used.
2
Configure the centralized S3 bucket policy in the security account.
The bucket policy allows cross-account log delivery from all accounts within the AWS Organization.
Cross-account access to the central S3 bucket must be explicitly allowed using a bucket policy with an organizational ID condition.

Anahtar Kavram

Operational Excellence via centralized logging and monitoring involves configuring agents to handle rotated log patterns and setting up secure cross-account permissions on destination buckets.
Bu soruyu puanla