How to troubleshoot an Elastic Load Balancer (Application) — AWS

Alvaro Andres Pinzon Cortes
2 min readJul 16, 2019

--

Troubleshooting strategies

  • Access Logs
  • Inspecting the code in the cloudformation script (Only if cloudformation was used)
  • Use CloudTrail logs
  • Use AWS ELB troubleshooting guide

Access Logs

Try this approach

In this experimentation we are going to start from zero. If you already have a load balancer that is configured you can ignore the steps where I create the load balancer and the EC2 instance.

  1. Create an EC2 instance

Follow the instructions in here https://docs.aws.amazon.com/efs/latest/ug/gs-step-one-create-ec2-resources.html

2. Add a security group to the EC2 instance

The security group for this instance needs the following rules:

3. Add a load Balancer and connect it to the EC2 instance

NOTE: It is very IMPORTANT that you set the EC2 instance previously created as the target

Follow the instructions in here https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-application-load-balancer.html

4. Creating the S3 bucket to store the access logs

Follow the instructions in here https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html#access-logging-bucket-permissions

5. Enable logging access in the load balancer

Follow the instructions in here https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html#enable-access-logging

6. Process the information

6.1 Download the access log file from S3

6.2 Create an spreadsheet in excel or in Google Sheets like this one:

You can use this example: https://docs.google.com/spreadsheets/d/1Y6QsV1r_sEYTEpyqkBHMQqFyKMGpYQY2cwevaq6UKV0/edit?usp=sharing

6.3 Copy the info in the log file and paste it in the spreadsheet.

6.4 Divide the info in each row into columns, dividing its content by whitespace

7. Analyze the processed information

--

--

No responses yet