Soru

Zorluk: OrtaSecurity Monitoring, Logging, and Compliance Auditing

A company has a compliance requirement to retain all system logs for exactly 90 days. A SysOps Administrator is auditing the current logging configuration and discovers several Amazon CloudWatch log groups with their retention periods set to 'Never expire'. The administrator wants to ensure that all current and future logs in these log groups are deleted after 90 days. Which action should the administrator take to meet this requirement?

  1. Modify the retention settings directly on each CloudWatch log group to 90 days.Cevap
  2. B
    Modify the retention settings on each individual log stream within the log groups to 90 days.
  3. C
    Create an Amazon EventBridge rule that triggers an AWS Systems Manager Automation document to scan and delete log streams older than 90 days.
  4. D
    Apply an Amazon S3 Lifecycle policy with an expiration rule of 90 days directly to the CloudWatch log groups.

Cevap

Modify the retention settings directly on each CloudWatch log group to 90 days.
Modifying the retention settings at the log group level is the standard and most efficient way to manage log expiration in Amazon CloudWatch. CloudWatch Logs automatically deletes log events older than the specified retention period for all streams within that log group.

Adım Adım Çözüm

1
Identify the level at which retention policies are configured in Amazon CloudWatch Logs.
Confirm that retention policies can only be configured at the log group level, not the individual log stream level.
This determines where the configuration change must be applied.
2
Evaluate the native capabilities of CloudWatch Logs compared to external automation tools.
Understand that CloudWatch Logs natively supports automatic deletion of expired log events based on the log group's retention configuration.
This helps select the solution with the least administrative effort and operational complexity.
3
Apply the 90-day retention setting directly to the target CloudWatch log groups.
All existing and future log streams within these log groups will inherit the 90-day retention policy, satisfying the compliance requirement.
This implements the required configuration to resolve the issue.

Anahtar Kavram

CloudWatch Logs retention policy configuration
Bu soruyu puanla