A company is running an application on several Amazon EC2 instances in 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?
Select one answer.
Marked answer: B
Community Discussion
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Chose B1
Lifecycle hook pauses instance termination. EventBridge detects the lifecycle event. Lambda uses Systems Manager SendCommand to execute on the instance, copying logs to S3. Once logs are copied, it sends CONTINUE to the Auto Scaling group. Fully automated, graceful, and scales properly.
Chose B1
This is most accurate with redundancy as EventBridge can directly invoke SSM Document and you don't need Lambda function.
Chose B1
B using systems manager
Keyboard:←→previous / next·A–Echoose·Entercheck, then next