Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ross-humphrey/4894cc8b3894a67eef10b7e659ed9964 to your computer and use it in GitHub Desktop.
Save ross-humphrey/4894cc8b3894a67eef10b7e659ed9964 to your computer and use it in GitHub Desktop.
πŸ“’ Connect public facing load balancer to EC2 with private IP
Create public subnets in the same AZ's as the private subnets that are used by private instances. Associate the public subnets
to the internet facing load balancer
Public subnet:
> Subnets default traffic is routed to an internet gateway
> Subnet is known as a public subnet
> Instance launched in subnet with elastic IP or public IP associated with it then it is publiclly accessible
Private Subnet:
> If subnets default traffic is routed to a NAT instance or gateway or lacks default route then private
How to:
> List AZ's that have the instances you want to attach to load balancer
> Create equal number of public sunets in same AZ as private instances
> From console, create a load balancer - associate the newly created public subnets with it
> Add private instances to the load balancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment