Site icon Exam4Training

What should a SysOps administrator do to retain the application logs after instances are terminated?

A company runs us Infrastructure on Amazon EC2 Instances that run In an Auto Scaling group. Recently, the company promoted faulty code to the entire EC2 fleet. This faulty code caused the Auto Scaling group to scale the instances before any of the application logs could be retrieved.

What should a SysOps administrator do to retain the application logs after instances are terminated?
A . Configure an Auto Scaling lifecycle hook to create a snapshot of the ephemeral storage upon termination of the instances.
B . Create a new Amazon Machine Image (AMI) that has the Amazon CloudWatch agent installed and configured to send logs to Amazon CloudWatch Logs. Update the launch template to use the new AMI.
C . Create a new Amazon Machine Image (AMI) that has a custom script configured to send logs to AWS CloudTrail. Update the launch template to use the new AMI.
D . Install the Amazon CloudWatch agent on the Amazon Machine Image (AMI) that is defined in the launch template. Configure the CloudWatch agent to back up the logs to ephemeral storage.

Answer: B

Explanation:

To retain application logs after instances are terminated, configure the EC2 instances to send logs to Amazon CloudWatch Logs.

Steps:

Create a New AMI:

Create a new AMI that includes the Amazon CloudWatch agent.

Install and configure the CloudWatch agent to send logs to CloudWatch Logs.

Reference: Installing the CloudWatch Agent

Update the Launch Template:

Update the Auto Scaling group’s launch template or launch configuration to use the new AMI.

Reference: Launch Templates

Configure Log Group and Retention:

Ensure that the CloudWatch Logs group is properly configured with the desired retention policies.

Reference: CloudWatch Logs Retention

Test the Configuration:

Test the setup to ensure logs are properly being sent to CloudWatch Logs upon instance termination.

Reference: Using CloudWatch Logs

Latest SOA-C02 Dumps Valid Version with 54 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Exit mobile version