nerdexam
Amazon

DOP-C02 · Question #69

For auditing, analytics, and troubleshooting purposes, a DevOps Engineer for a data analytics application needs to collect all of the application and Linux system logs from the Amazon EC2 instances…

The correct answer is C. Create an EC2 Instance-terminate Lifecycle Action on the group, create an Amazon CloudWatch. Because using Amazon CloudWatch Events rule is better than writing a script.

Submitted by dimitri_ru· Mar 6, 2026Monitoring & Logging

Question

For auditing, analytics, and troubleshooting purposes, a DevOps Engineer for a data analytics application needs to collect all of the application and Linux system logs from the Amazon EC2 instances before termination. The company, on average, runs 10,000 instances in an Auto Scaling group. The company requires the ability to quickly find logs based on instance IDs and date ranges. Which is the MOST cost-effective solution?

Options

  • ACreate an EC2 Instance-terminate Lifecycle Action on the group, write a termination script for
  • BCreate an EC2 Instance-terminate Lifecycle Action on the group, write a termination script for
  • CCreate an EC2 Instance-terminate Lifecycle Action on the group, create an Amazon CloudWatch
  • DCreate an EC2 Instance-terminate Lifecycle Action on the group, push the logs into Amazon

How the community answered

(45 responses)
  • A
    9% (4)
  • B
    16% (7)
  • C
    44% (20)
  • D
    31% (14)

Explanation

Because using Amazon CloudWatch Events rule is better than writing a script.

Topics

#Auto Scaling lifecycle hooks#CloudWatch Logs#log retention#cost optimization#log analysis

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice