Public IP of AWS Internet gateway
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
An AWS Internet Gateway does not have its own public IP address that you assign or target directly. Instead, it is a managed VPC component that enables traffic between public IP addresses attached to resources in your VPC and the internet.
What an Internet Gateway actually does
An Internet Gateway, usually shortened to IGW, is attached to a VPC and used as a route target for internet-bound traffic. It is horizontally scaled and highly available, but it is not a virtual machine or appliance with a single address you can look up.
A public subnet route table typically contains a default route like this:
That route means instances in the subnet can send internet-bound traffic through the IGW, assuming they also have appropriate public addressing and security rules.
Where the public IP really lives
The public IP belongs to the resource, not to the Internet Gateway.
For example, an EC2 instance in a public subnet may have:
- an auto-assigned public IPv4 address
- an Elastic IP
- a private IP inside the VPC
The IGW simply provides the path that lets internet traffic reach that public address.
Example architecture
A typical public EC2 setup looks like this:
The public IP is visible on the EC2 instance or Elastic IP allocation, not on the gateway.
Contrast with NAT gateways and load balancers
This confusion often comes from mixing up Internet Gateways with other AWS networking components.
A NAT Gateway does have an Elastic IP associated with it because it is a specific managed translation endpoint used for outbound internet access from private subnets.
An Application Load Balancer or Network Load Balancer can also expose public-facing addresses or DNS names.
An Internet Gateway is different. It is a routing construct for the VPC itself, not a single-address ingress endpoint.
Minimal route example
Here is a simplified route table snippet for a public subnet:
That route alone is not enough for internet access. The instance also needs a public IP or Elastic IP, and the security group and network ACLs must allow the relevant traffic.
How to think about inbound traffic
If a user on the internet connects to an EC2 instance's Elastic IP, AWS maps that traffic to the instance and forwards it through the Internet Gateway path. The gateway is in the path, but the destination public address is still the instance's address.
So asking for the Internet Gateway's public IP is usually the wrong mental model. The better question is: which VPC resource has the public IP I care about?
Common Pitfalls
A common mistake is expecting the IGW to behave like a firewall appliance or a single public endpoint. It is neither.
Another issue is assuming that attaching an IGW automatically gives instances internet access. Without a public IP, the correct route table, and open security rules, the instance still will not be reachable.
It is also easy to confuse IGWs with NAT Gateways. NAT Gateways own Elastic IPs; Internet Gateways do not.
Summary
- An AWS Internet Gateway does not have its own public IP address.
- Public IPs belong to resources such as EC2 instances, Elastic IP allocations, or public load balancers.
- The IGW is a route target that enables internet connectivity for a VPC.
- Internet access also requires correct route tables, public addressing, and security rules.
- If you need a fixed public address, look at the resource or service exposed to the internet, not the IGW itself.
Related reading
- Publish to S3 using Git?
- Pulumi - How can I remove imported resources from my stack without deleting them from aws?
- Purpose of Amazon SQS message's body as against message's attributes
- Push docker image to amazon ecs repository
- Publish to RabbitMQ queue with HTTP API
- Publishing to the default rabbitmq exchange using the http api
- Push docker image to amazon ecs repository
- Push Messages from AWS Lambda to Kafka

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.