nerdexam
Amazon

SAP-C02 · Question #109

A an Auto Scaling group behind an Application Load Balancer. The load on the application varies throughout the day, and EC2 instances are scaled in and out on a regular basis. Log files from the EC2…

The correct answer is B. Create an AWS Systems Manager document with a script to copy log files to Amazon S3. The SNS and Event bridge will work. For abandon vs Continue - (Action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occur). You want to continue even if there is a time out, instead of abandoning the log file copying…

Submitted by deeparc· Mar 6, 2026Continuous Improvement for Existing Solutions

Question

A an Auto Scaling group behind an Application Load Balancer. The load on the application varies throughout the day, and EC2 instances are scaled in and out on a regular basis. Log files from the EC2 instances are copied to a central Amazon S3 bucket every 15 minutes. The security team discovers that log files are missing from some of the terminated EC2 instances. Which set of actions will ensure that log files are copied to the central S3 bucket from the terminated EC2 instances?

Options

  • ACreate a script to copy log files to Amazon S3, and store the script in a file on the EC2 instance.
  • BCreate an AWS Systems Manager document with a script to copy log files to Amazon S3.
  • CChange the log delivery rate to every 5 minutes. Create a script to copy log files to Amazon S3,
  • DCreate an AWS Systems Manager document with a script to copy log files to Amazon S3.

How the community answered

(61 responses)
  • A
    2% (1)
  • B
    85% (52)
  • C
    3% (2)
  • D
    10% (6)

Explanation

The SNS and Event bridge will work. For abandon vs Continue - (Action the Auto Scaling group takes when the lifecycle hook timeout elapses or if an unexpected failure occur). You want to continue even if there is a time out, instead of abandoning the log file copying. https://aws.amazon.com/blogs/infrastructure-and-automation/run-code-before-terminating-an- ec2-auto-scaling-instance

Community Discussion

No community discussion yet for this question.

Full SAP-C02 Practice