I am experimenting with putting our AWS EC2 instances behind a load balancer. This works well but I have an issue that I am unsure how to resolve.
The instances that are behind the load balancer don't have a public IP address assigned and have no direct access to the internet other than via the load balancer.
The issue is that this means that I cannot update the instance using yum as you get the following:
Loaded plugins: priorities, update-motd, upgrade-helper Could not retrieve mirrorlist http://repo.eu-west-1.amazonaws.com/latest/main/mirror.list error was 12: Timeout on http://repo.eu-west-1.amazonaws.com/latest/main/mirror.list: (28, 'Connection timed out after 10000 milliseconds')
Similarly I cannot download the latest code from git to the instance for the same reason.
I have done a search but I cannot find a solution to this. How do others resolve this? What is the best practice for this? Is the only way to assign a public IP to every instance behind the load balancer?