Get IP Address and Port of AWS ELB Backend Instances | Exam Question Answer

AWS ELB Backend Instances IP Address and Port | Exam Question Answer

Prev Question Next Question

Question

There is a requirement to get the IP address and port of the backend instances which serve traffic sent via an AWS ELB.

How can this be achieved.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - D.

The AWS documentation mentions the following.

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 instance's IP address, latencies, request paths, and server responses.

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

For more information on the ELB Log files , please visit the below URL:

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

The correct answer for this question is D. Enable ELB Access logs. Check the logs.

Explanation:

When you have an Elastic Load Balancer (ELB) in front of your backend instances, traffic from the clients is forwarded to your backend instances through the load balancer. In order to get the IP address and port of the backend instances serving traffic, you need to enable access logs on the ELB.

To enable access logs on an ELB, you can follow these steps:

  1. Open the Amazon EC2 console.
  2. In the navigation pane, choose "Load Balancers."
  3. Select your load balancer.
  4. Choose the "Attributes" tab, and then choose "Access logs."
  5. Choose "Enable access logs."
  6. Specify the S3 bucket where you want to store the logs.
  7. Choose the prefix that you want to use for the log file names.
  8. Choose the IAM role that the ELB will use to write the logs to the S3 bucket.

Once you have enabled access logs on the ELB, you can check the logs to get the IP address and port of the backend instances serving traffic. The logs will contain information about the requests received by the ELB, including the IP address and port of the backend instances that served the request.

Therefore, option D is the correct answer for this question. Options A, B, and C are not relevant to this requirement. VPC Flow Logs provide information about the traffic that flows through a VPC, but they do not provide information about the IP address and port of the backend instances serving traffic. Cloudwatch metrics can provide information about the health of your ELB, but they do not provide information about the IP address and port of the backend instances serving traffic. The ELB console provides information about the load balancer and its configuration, but it does not provide information about the IP address and port of the backend instances serving traffic.