Troubleshooting Empty ELB Access Logs | Diagnosing Errors in AWS | DOP-C01 Exam

Why ELB Access Logs Are Empty

Prev Question Next Question

Question

You have just recently deployed an application on EC2 instances behind an ELB.

After a couple of weeks, customers are complaining about receiving errors from the application.

You want to diagnose the errors and are trying to get errors from the ELB access logs.

But the ELB access logs are empty.

What is the reason for this?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - D.

Elastic Load Balancing provides access logs that capture detailed information about requests sent to your load balancer.

Each log contains information such as the time the request was received, the client's IP address, latencies, request paths, and server responses.

You can use these access logs to analyze traffic patterns and to troubleshoot issues.

Access logging is an optional feature of Elastic Load Balancing that is disabled by default.

After you enable access logging for your load balancer, Elastic Load Balancing captures the logs and stores them in the Amazon S3 bucket that you specify.

You can disable access logging at any time.

For more information on ELB access logs, please refer to the below document link: from AWS.

http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html

The correct answer is D. Access logging is an optional feature of Elastic Load Balancing that is disabled by default.

Explanation:

When you create an Elastic Load Balancer (ELB) in AWS, access logging is an optional feature that can be enabled to capture information about requests made to the ELB. Access logs contain information such as the time of the request, the client IP address, the requested URL, the response code, and the amount of data transferred.

By default, access logging is disabled on an ELB. Therefore, if you have not enabled access logging for your ELB, the access logs will be empty, and you will not be able to diagnose errors or troubleshoot issues related to requests to the ELB.

If you want to enable access logging for your ELB, you can do so by following these steps:

  1. Open the Amazon EC2 console and navigate to the Load Balancers page.
  2. Select the ELB for which you want to enable access logging.
  3. Click the "Edit attributes" button.
  4. Scroll down to the "Access logs" section and click the "Enable access logs" checkbox.
  5. Enter the S3 bucket name and prefix where you want the logs to be stored.
  6. Click the "Save" button.

Once you have enabled access logging for your ELB, it may take some time for logs to be generated. Logs are stored in an S3 bucket that you specify and are updated at intervals that you also specify. By default, logs are retained for up to 7 days, but you can configure this to be longer if necessary.

In summary, if you have not enabled access logging for your ELB, the access logs will be empty, and you will not be able to diagnose errors or troubleshoot issues related to requests to the ELB. Therefore, it is important to ensure that access logging is enabled if you need to capture information about requests made to your ELB.