EC2 ELB Troubleshoot Setup

TODO: collapasable, copyable, download, etc

I want to setup a classic ELB to troubleshoot an issue. I have setup a lister on listener port 80 and instance port 5173. I attached my EC2 instance. On the EC2 instance I'm running a SvelteKit app on port 5173. Does that sound correct?Your setup sounds mostly correct, but let's review each component to ensure everything is configured properly for troubleshooting an issue with a SvelteKit app running on an EC2 instance behind a Classic Elastic Load Balancer (ELB) in AWS.

  1. Classic ELB Configuration:

    • Listener Port: You've set the listener port to 80, which is standard for HTTP traffic. This means the ELB will listen on port 80 for incoming traffic.
    • Instance Port: You've set the instance port to 5173, which is where your SvelteKit app is running. This means the ELB will forward traffic it receives on port 80 to port 5173 on the attached EC2 instance(s).
  2. EC2 Instance Configuration:

    • Your EC2 instance has your SvelteKit app running on port 5173. Ensure that the security group attached to your EC2 instance allows inbound traffic on port 5173 from the ELB. This is crucial for the ELB to be able to communicate with your SvelteKit application.
  3. Security Groups:

    • ELB Security Group: Ensure it allows inbound traffic on port 80 from your clients (e.g., anywhere if it's public or specific IPs if it's restricted).
    • EC2 Security Group: Ensure it allows inbound traffic on port 5173 from the ELB. You can specify the source as the security group of the ELB itself for tighter security.
  4. Health Checks:

    • Make sure the health check configuration in the ELB is set to check the health of your EC2 instances on the correct port and path. If your SvelteKit app has a specific endpoint that should be used for health checks, configure the ELB health check to use that endpoint. This ensures that the ELB can accurately determine the health of your instances.
  5. DNS Configuration:

    • Ensure that the DNS name of the ELB (given by AWS) is properly configured in your DNS settings if you're using a custom domain. This directs the traffic to the ELB.
  6. Debugging Tips:

    • Check the application logs on your EC2 instance for any errors.
    • Use the AWS Management Console or AWS CLI to inspect the ELB and its health status.
    • Ensure your application is correctly binding to the specified port (5173) and is configured to accept connections from any IP (not just localhost) if it's behind an ELB.

If everything is set up as described and you're still facing issues, you might want to double-check the application configuration or the security group rules. It's also a good idea to look into ELB access logs if they're enabled, as they can provide insights into the traffic reaching the ELB and any potential issues.

EC2 ELB Troubleshoot Setup created at Tue Jan 20 1970 18:25:55 GMT+0000 (Coordinated Universal Time)

Related Chats

Configure SvelteKit for ELB 0.721

ELB Headers Configuration 0.667

Fix ELB IP Forwarding 0.573

Switch to EKS: Steps 0.522

K8s Headers Forwarding Configuration 0.488

Troubleshooting Docker UDP Traffic 0.404

Scaling Docker Across EC2 0.381

Fargate Requirement for ECS 0.377

Curl with Origin Header 0.361