Amazon ELB for EC2 instances in private subnet in VPC

后端 未结 2 745
梦谈多话
梦谈多话 2020-12-12 12:17

I\'m using Amazon EC2, and I want to put an internet-facing ELB (load balancer) to 2 instances on a private subnet. I am using VPC with public and private subnets.

2条回答
  •  失恋的感觉
    2020-12-12 12:57

    The other SO question helped me as well. For me I kept forgetting that I needed to install software to server (i.e Apache) and if you don't create a NAT GW or some other method to allow software installs it will fail. If you want to try an automated fashion w/o much hassle, you can try a script:

    https://github.com/jouellnyc/AWS/tree/master/create_aws_vpc3
    

    Note there's plenty of good docs and discussions already but:

    HTTP codes I got from the ELB:

    • 504 - Probably security groups - allow access to the port 80 of the instances
    • 503 - Probably the wrong target group setup
    • 502 - Probably Apache/Server not running b/c it’s not installed because there's no nat gw or method to install software.

提交回复
热议问题