I'm currently developing a NodeJS application that I want to deploy in Elastic Beanstalk (EBS). To isolate & secure my cloud resources I'm using VPCs where I deploy the EBS app and also my databases. I'm using an application load balancer to route the traffic to the EC2 instance(s). I already managed to get everything working meaning that the app can communicate with the database inside the VPC and some other stuff.
However, one thing I don't really understand and causes errors is when I set the :
Instance Settings "Public IP address" to false. When I deploy with "Public IP address" set to False, the instance is not reachable and every request returns a 502 error. I suspect that it is because the EC2 instance does not have an internet connection anymore but I have an Internet Gateway defined for it which you can see here.
Hence, my questions related to this are the following:
- Does having a public IP address have any security implications that I need to take care of? Is this even a problem when I deploy the ec2 instance in a private VPC?
- How can I setup my environment with public ip address false and still have it deploy my instances correctly?