Hi, I have some question about AWS ELB-EC2-RDS 3-tier architecture in VPC.
I’m first at IaC, not good at aws, and my code should be refactored, but I need some helps and comprehensions about why my ELB(or VPC, or Web Server) is not working.
https://github.com/SeongIkKim/pulumi-aws-3-tier/blob/master/__main__.py
This is my code, and my ALB is not successful for health check and routing for my EC2 servers. When I get into ALB public dns, I see 502 BadGateway Error. I know that this question is quietly broad, but I can’t get it anyway.
In my suspicion, there are some points.
1. ec2, LB security group. I don’t know how to attach my LB sg to ec2. (It was easy in console, but…)
2. VPC subnet is not well-structured, so My ALB is pointing some useless route..?
3. EC2 user data(simplehttp WAS setting) is not made.
In 3rd, however, I can’t get logs because pulumi provises the instance without keypair. I’ve tried to get in ec2 with bastion host, but there is no public key in instance.