Chapter 15: Amazon VPC — Subnets, Route Tables, NACL, NAT Gateway and Bastion Host
15.5 Internet gateway
In short: An internet gateway (IGW) is a horizontally scaled, redundant and highly available VPC component that connects your VPC to the internet.
Think of the internet gateway as a gate for direct access. The chosen subnet still needs the right route, and the service needs suitable addressing and permissions. A private worker can use a different approved path for its own connections.
Internet Gateway हा थेट internet access साठीचा gate समजा. योग्य subnet route, IP address आणि traffic permissions वेगळे तपासा. Private worker ला दुसरा मंजूर path लागू शकतो.
Internet Gateway को सीधे internet access का gate समझो। सही subnet route, IP address और traffic permissions अलग से जाँचो। Private worker अपनी ज़रूरत के लिए दूसरा मंज़ूर path इस्तेमाल कर सकता है।
An internet gateway (IGW) is a horizontally scaled, redundant and highly available VPC component that connects your VPC to the internet. For an instance with a public IPv4 address, it translates between the instance's private IP and its public IP (one-to-one NAT). A VPC can have one internet gateway attached at a time, and the gateway itself has no charge (public IPv4 addresses are charged separately).
For ordinary direct IPv4 access through an internet gateway, check these conditions. Also verify any account-level policy and the intended application listener.
| # | Condition | Where |
|---|---|---|
| 1 | An internet gateway is attached to the VPC | VPC → Internet gateways |
| 2 | The subnet's effective route table has an applicable route to the attached internet gateway, commonly 0.0.0.0/0 → igw-.... |
VPC → Route tables |
| 3 | The instance has the supported public IPv4 association for the path, such as an automatically assigned address or an Elastic IP. | EC2 → Instances |
| 4 | The security group and the network ACL allow the traffic | EC2 / VPC |
Create and attach the internet gateway
- VPC → Internet gateways → Create internet gateway → Name tag
society-igw→ Create internet gateway. - On the new gateway: Actions → Attach to VPC → choose the verified ID of the approved
society-vpcsandbox → Attach internet gateway. If it already has an attached internet gateway, verify the existing one. - The State changes from Detached to Attached.
For an approved CLI exercise, use the create-internet-gateway reference and the attach-internet-gateway reference. Use the ID returned by creation and the verified sandbox VPC ID in the correct account and Region.
Ravindra Bagale's Tip
Many students create the IGW and forget Attach to VPC – the State stays Detached, and then it feels like "I did everything but there is no internet". As soon as you create the IGW, attach it and check that the State is Attached. Very simple, but people get it wrong a lot.
Ravindra Bagale's Tip – मराठी
बरेच students IGW बनवतात आणि Attach to VPC करायला विसरतात – State Detached च राहतो आणि मग "सगळं केलं तरी internet नाही" असं वाटतं. IGW बनवला की लगेच attach करा आणि State Attached आहे का ते बघा. एकदम simple, पण खूप वेळा चुकतात.
Ravindra Bagale's Tip – हिंदी
बहुत से students IGW बनाते हैं और Attach to VPC करना भूल जाते हैं – State Detached ही रहता है और फिर लगता है "सब किया फिर भी internet नहीं". IGW बनाते ही attach करो और देखो कि State Attached है या नहीं. एकदम simple, पर बहुत बार गलती होती है.
Lab
Use the local gateway-path worksheet below. For an authorised sandbox build, inspect whether your VPC already has an attached gateway. If the design needs one and none exists, create and attach the intended gateway and verify its association. There is no need to create a second gateway to learn the attachment limit. Plan cleanup for the lab-owned gateway and its routes.
Step-by-step guide
Draw the path from a visitor to one web entry
The training centre wants families to open a course timetable from the internet. The operator has started the web app and can see the correct page from a test machine inside AWS. A phone using its mobile network cannot reach the same site. A teammate says to attach an internet gateway. That might be one required change, but it is only one line in the complete path. Begin by naming the actual public entry, intended client, address family and protocol. You will need those facts to explain which part is missing or which part behaves as designed.
A VPC internet gateway, usually abbreviated IGW, is an AWS-managed component that supports direct traffic between a VPC and the internet under suitable routes and addressing. AWS runs it as a redundant, scalable component. You attach it to the selected VPC and can target it in relevant route tables. It does not open an application port, give an instance a public address, choose a website by hostname, provide an HTTPS certificate, or log a person into the app. Other parts of the design perform those jobs.
Write one complete requirement for the centre. An ordinary external IPv4 visitor should open the site at the intended name, complete HTTPS and see the current timetable. No other EC2 roles need direct public access for that operation. The operator may also have a private update or administration path. Those are different paths with different starting points and purposes. A destination that is intended to remain private does not need a direct gateway route just because the project has a web page.
This lesson focuses on the direct gateway path. A subnet can also use a NAT gateway to let a private workload initiate certain traffic, or connect to a business network using other methods. A service could be reachable through a completely different public entry that makes a separate private connection. When evaluating any result, state whether you tested direct internet access to the interface, access via an application entry, or a chosen private connection. The distinction matters as soon as the project has more than one source or destination.
Find the gateway attachment and the subnet's actual route table
A gateway can exist without being attached. In an AWS inventory, an internet gateway is identified by an ID beginning with igw-. Look at the gateway's VPC attachment, and match its assigned ID to the intended VPC. A gateway named society-igw is just a resource carrying that name tag. Tags are convenient for people. They cannot guarantee which VPC actually uses the object. A detached gateway does not provide the direct path to the intended VPC.
Next trace the particular subnet's effective route table. A subnet uses the VPC main table if there is no other explicit association. It may instead use a separately associated table. The presence of a route in a table called Public routes proves little until you match that table to the workload's subnet ID. A common IPv4 design adds 0.0.0.0/0 to the attached internet gateway for a public subnet. That route can cover IPv4 destinations without a more specific matching path. The operator can also configure an appropriate narrower destination where the requirement is limited to selected addresses. Read the effective route for the actual destination rather than assuming everything uses the default.
Suppose the VPC already has a gateway attached. The main route table contains only local routes. Web A is supposed to use a separate public table with the default gateway route. If the association was omitted, an instance launched into Web A still selects the main table. The name Web A, the public-IP assignment setting, and the gateway's attachment can all look correct while the route is absent. Show a student the subnet ID, effective table ID and target together. An edit to the main table would affect other subnets still using it, so complete the intended association review before choosing a fix.
Another common case starts with a subnet that already has a gateway route, and the operator adds an IPv4 address expecting an allowed web service. The route applies to traffic decisions for the associated subnet. It does not override another best-matching route, a blackhole entry, account policy, anti-spoofing behavior, network access controls or the listener. Check the route's current state and how return traffic will leave. For example, a path can have a usable incoming path but send replies through a different selected target if the route for the outside client differs. Asymmetric paths can matter to the design and its stateful controls.
A VPC can have one ordinary internet gateway attached at a time. One gateway can serve suitable routes from public subnets in more than one Availability Zone. A new public placement in another zone does not require a second ordinary internet gateway for the same VPC. Adding a second route table also does not indicate a second gateway. Draw the table associations and target identity rather than repeating a gateway icon for each zone. Decide whether you are drawing a logical shared component or multiple actual objects before counting them.
For now keep the drawing to the ordinary subnet route design. An advanced design can add a gateway route table, which is associated with the gateway and can redirect supported inbound traffic to an inspection component. This is a separate association from the one used for a subnet. It has its own restrictions on destinations and targets. Do not create it as a routine beginner step. Its existence is another reason to read a real architecture before changing an edge path. When a team uses a managed network inspection pattern, consult its traffic and return-routing design.
Follow the public IPv4 mapping and the actual listener
With a suitable public IPv4 address associated to an EC2 instance, the internet gateway logically provides a one-to-one address mapping between that public address and its associated private IPv4 address. Use two addresses in your notes. The web instance's interface inside the VPC might have 10.76.20.10. The outside visitor sees an assigned public address. For an inbound visit to the assigned public IPv4 address, the traffic reaches the private interface through the mapping and the applicable policy. For traffic out through the gateway, the intended associated public address is used on the internet side. The instance uses its private address configuration internally.
This explains an observation many beginners find surprising. The EC2 console shows both a private address and a public IPv4 address, but the normal operating system interface output shows the private IPv4 address. The gateway provides the mapping outside the guest's interface configuration. Do not try to set the observed public IPv4 address as a new address on the guest interface merely to make the display match. Check which local address and port the web program listens on. A process listening only on the guest loopback address will not automatically accept ordinary packets arriving at the private interface even when public address mapping and routing are correct.
Auto-assign public IPv4 is a launch-related setting for eligible interfaces or instances. It can be a subnet default and may be overridden at launch depending on the configuration. Changing the subnet setting does not retroactively install a public IPv4 mapping on every instance already there. Check the actual assigned address. An Elastic IP can be allocated to the account and associated with a selected supported resource when a stable address is required. It has a separate lifecycle from an automatically assigned public address. Confirm the correct association and operating cost before using one.
An automatically assigned public address can change across stop and start. Suppose the web app still answers inside the VPC after a learner stops and starts the host. The public DNS name now resolves to the former public IPv4 address. Even a correctly attached gateway and active table do not direct the name to the new address. Compare the public DNS records and expected new entry. A stable approved application entry, such as a managed load balancer accessed by its suitable name, can be better than depending on one learned ephemeral address. The appropriate choice depends on the service requirement and stability of the endpoint.
Public IPv4 can have a cost distinct from the internet gateway. AWS does not charge an hourly fee merely for an ordinary IGW. Associated services, data transfer and public IPv4 allocations may be billed. Check current pricing for the real resources, region, and allocation type. A retained Elastic IP may continue to incur charges even after the test instance no longer serves a site. An internet-facing service may also manage its own public addresses. Check which resources are service managed and follow their owners' release methods. A networking lesson should show which resources are part of the bill rather than suggesting that a free gateway makes the whole exercise free.
The gateway's direct mapping is separate from a private app's public NAT use. The private app does not each need its own public IPv4 address merely because a NAT gateway serves its outbound traffic. In a common public zonal NAT design the app subnet routes its selected traffic to the NAT gateway and that component uses the attached internet gateway path with its public address. Connections initiated from outside do not automatically reach particular private app servers through that gateway. If the requirement is for an outside browser to initiate HTTPS, create a dedicated approved public entry, not a broad set of direct app or data connections.
Review the IPv6 path independently
IPv6 direct internet access needs its own address and route decisions. A VPC and the selected subnet have relevant IPv6 allocations, and the actual interface has a suitable IPv6 address. A direct IPv6 route can target an ordinary internet gateway, commonly with ::/0 for all otherwise unmatched IPv6 destinations. This does not use the ordinary internet gateway's one-to-one IPv4 NAT behavior. The IPv6 path can use the suitable IPv6 address directly. The planned DNS answers, listener and rules must support that family.
A public IPv6 address does not defeat other controls. The route, network permissions, host policy and selected listeners still determine usable connections. AWS also documents eligible private IPv6 address allocation using IPAM. An ordinary internet gateway or egress-only internet gateway does not directly route private IPv6 internet egress under that AWS model. Distinguish a public IPv6 address with intentionally limited routes from an address allocated under a private IPv6 policy. The words private subnet do not tell you which IPv6 address kind it uses.
An egress-only internet gateway is for IPv6. It can let suitable VPC resources begin outbound IPv6 connections and receive responses without permitting new connections initiated from the internet through that path. It tracks that traffic in the documented manner. A subnet route must target it for the selected IPv6 destinations. This is not a replacement for a public IPv6 website entry and will not route IPv4. Choose the route based on which side should initiate communication. If an app only needs an outbound IPv6 dependency, its requirements differ from the Internet-facing TLS listener.
Test both stacks deliberately in a dual-stack design. A phone may reach the intended public service using one family while a different device or network chooses the other. A single fast page load is a weaker signal than the expected response and observed family. Inspect the A and AAAA DNS records, verify which public entry they point to, and test each supported path with a client that can actually use it. When address records change, allow for the relevant DNS caching behavior and use observed current answers instead of guessing from the configured value alone.
Two decisions can produce a similar-looking symptom. If an IPv6 client receives no suitable DNS address, your next check concerns naming or the documented endpoint type. If it resolves the right address and fails to connect, verify that family's actual route, network policy and listener. Replacing the IPv4 public address will do little to explain an IPv6-only failure. For the course timetable, record the named service and its supported clients first. Then treat the IPv4 and IPv6 paths as two explicit rows with a defined expected result.
Check outside reachability at each policy and service boundary
For a simple approved public HTTPS operation, the security group attached to the public-facing interface permits the desired incoming TCP port from suitable clients. The associating subnet's network ACL must allow the necessary traffic in both directions when that policy applies. The host can have its own firewall. A responsive site also needs an active process with a matching listening address and port. These are distinct controls. Counting an associated security group therefore gives incomplete evidence. Check all relevant groups on the interface because permissions can be aggregated, and verify the actual needed flow in each direction.
Some AWS environments use VPC Block Public Access, or BPA, at the account and Region scope. The applicable mode or approved exclusion can prevent a path even when a relevant route and interface address exist. The security team could intentionally allow some egress or restrict bidirectional access under the documented configuration. A learner does not need to disable policy for an exercise. Verify the intended environment and network owner's plan. A test that fails under a deliberate organisation-wide control may be exhibiting the correct configuration rather than revealing a missing route.
Keep the packet view apart from the service view. A browser first resolves a name, establishes a transport connection, negotiates TLS for ordinary HTTPS, and then issues the requested HTTP operation. Compare the first symptom to the appropriate layer. A hostname that fails to resolve cannot test the internet gateway path to a specific IP. A certificate mismatch can occur after reaching a real remote listener but before a successful web request. An HTTP response such as 404 can demonstrate a listener answered but may belong to a different site or path. A working gateway does not imply the service's data appeared.
To make a useful active check, use a single authorised known HTTPS endpoint belonging to the exercise. Confirm the hostname and returned content, and check from the appropriate client network. An internal client might resolve a different address or exercise a direct private path. A successful internal test establishes that observed internal operation. It does not validate external access. Likewise, a successful ping is not necessary for HTTPS and cannot establish an HTTP response. A subnet ACL or security group may treat ICMP and TCP differently.
For a real deployment, describe the expected initial flow from outside and return path back to that specific client's IPv4 or IPv6 address. Under a restrictive ACL, make sure the appropriate reply port traffic has been considered. An inbound HTTPS request has destination 443 and the client normally uses a temporary source port. The response reverses source and destination, making the client's temporary port relevant to the outbound check. The security group connection-tracking model is separate. The later ACL lesson covers how to work through those direction decisions with concrete ports.
Separate a real listening process from a paper gateway path
This local exercise uses Python 3 and creates a temporary HTTP listener bound to the loopback address. First make a real request to it and read a timetable marker. Then evaluate a small synthetic gateway and route inventory. The local listener supplies direct evidence about a running app in the exercise. The inventory tests logical prerequisites for a hypothetical separately deployed cloud path. It uses reserved documentation addresses for the public side. No network outside your machine is contacted, and the worksheet never configures real NAT, a firewall or an AWS route.
Predict which condition fails in each scenario. The first shows a detached gateway. The second attaches it but leaves the associated table without a direct route. The third has a route and no public IPv4 mapping. The fourth supplies both but denies traffic through the sample policy. The fifth passes those fields and models a usable service. Finally, deliberately report the service as unbound in a copy of the configuration and verify that addresses and routes cannot make up for it. The result strings are diagnoses of the sample facts, not real packet error messages.
python3 - <<'PY'
from dataclasses import dataclass, replace
from http.client import HTTPConnection
from http.server import BaseHTTPRequestHandler, HTTPServer
from threading import Thread
class Timetable(BaseHTTPRequestHandler):
def do_GET(self):
content = b'next class: VPC foundations'
self.send_response(200)
self.send_header('Content-Length', str(len(content)))
self.end_headers()
self.wfile.write(content)
def log_message(self, *args):
pass
with HTTPServer(('127.0.0.1', 0), Timetable) as service:
worker = Thread(target=service.serve_forever, daemon=True)
worker.start()
try:
client = HTTPConnection('127.0.0.1', service.server_port, timeout=3)
try:
client.request('GET', '/timetable')
response = client.getresponse()
listening = response.status == 200 and response.read() == b'next class: VPC foundations'
finally:
client.close()
assert listening
print('Actual loopback test: the timetable listener answered as expected.')
finally:
service.shutdown()
worker.join(timeout=4)
assert not worker.is_alive()
@dataclass
class Design:
attachment: bool
direct_route: bool
mapping: dict
policy_allows: bool
service_listening: bool
def evaluate(plan, public_address):
if not plan.attachment:
return 'no gateway attachment'
if not plan.direct_route:
return 'no valid direct route in the associated table'
if public_address not in plan.mapping:
return 'no public IPv4 mapping for that address'
if not plan.policy_allows:
return 'traffic denied by modeled policy'
if not plan.service_listening:
return 'no intended service listening'
return 'modeled path to ' + plan.mapping[public_address]
public = '198.51.100.25'
sample = Design(True, True, {public: '10.76.20.10'}, True, listening)
cases = [
(replace(sample, attachment=False), 'no gateway attachment'),
(replace(sample, direct_route=False), 'no valid direct route in the associated table'),
(replace(sample, mapping={}), 'no public IPv4 mapping for that address'),
(replace(sample, policy_allows=False), 'traffic denied by modeled policy'),
(replace(sample, service_listening=False), 'no intended service listening'),
(sample, 'modeled path to 10.76.20.10'),
]
for scenario, expected in cases:
actual = evaluate(scenario, public)
assert actual == expected
print(actual)
assert evaluate(sample, '198.51.100.24') == 'no public IPv4 mapping for that address'
print('The neighboring sample IPv4 had no mapping. The loopback server is closed.')
PY
The lab records a real successful local connection before the gateway worksheet. The model carries that observed listener result as a starting condition while the local listener is then removed. Changing the synthetic attachment field leaves the earlier real observation true. It changes the modeled public access result because the conditions are independent. Read the message for each case. Changing the mapped public address in the request alone can also cause a missing mapping even though the original mapping still exists. This illustrates why a DNS record can point to the wrong otherwise plausible address.
When you see a route and public address in a real AWS console, collect enough evidence to replace those worksheet fields with precise facts. Use the actual gateway and table IDs, the matching resource interface, the configured port and the observed service. The test script intentionally evaluates its simplified checks in one clear order. AWS packet handling does not return these simple messages to external clients. A timeout does not identify which condition failed. Start from observed facts and compare the actual expected route and availability.
Run a small variation on paper. Leave the public mapping in place and claim the route points to an interface in a different VPC. That is not a valid route for the intended direct gateway path, so set the direct route field false. Then consider a working private test through a local VPC route. The worksheet still reports a missing direct path, but you can have an independent valid private result. Splitting the private and public observations is useful when investigating a service that should accept only its chosen public entry or should remain entirely private.
Configure an approved gateway without changing unrelated subnets
Start an authorised sandbox inventory with the VPC ID, selected account and Region, actual subnet ID and network scope. Confirm whether the VPC already has an attached internet gateway. If a separately owned lab VPC needs one and there is no attachment, use the Internet Gateways view to create a named gateway and attach it to that intended VPC. Match the returned gateway and VPC IDs. Results for an owned sandbox should never depend on modifying a default VPC or another site. If the gateway is already attached and appropriate, observing it may be all you need for that part of the exercise.
Next inspect the route table to be used by the particular sandbox public subnet. Check its current associations and existing routes. If your approved build intends a direct IPv4 default path, add that route to the scoped table targeting the attached gateway, then verify the table association. Use the new resource's actual ID from the creation response if working with the CLI. In a shared VPC, coordinate with the owner. Replacing an existing default route without investigating its reason could alter traffic for more workloads than the test. Distinguish a new table under your ownership from an existing table used by several teams.
Verify actual instance addressing and the chosen service controls separately. For testing a public web entry, confirm the public address or managed endpoint expects the named host and has the planned listener. Use the narrow test path appropriate to the account. You do not need to make the app, SSH service or database reachable from the general internet to verify a web path. Look for the expected safe page marker instead of accepting any response as proof. If it fails, preserve evidence about the part that already works and change only the relevant authorised configuration.
Record cleanup before creating resources. Remove or change the designated test service according to its owner workflow. Review any public address association or allocation the lab owns. Before removing an owned gateway, check associated routes and required detach dependencies, including the documented public-IP conditions. Do not detach it from a VPC that still serves other resources expecting that path. Confirm the release of the intended sandbox components and the continued operation of unrelated ones from their ordinary endpoints if you were authorised to check them. The local exercise above has already cleaned up its own listeners and needs no AWS cleanup.
Use the same hostname and site marker throughout a diagnosis
Here is a support case to work through. The operator checks the correct VPC and finds an attached internet gateway and a public route. An instance still responds to the internal test using its private IPv4 interface. The outside user says the site stopped working after an instance restart. The console shows a current public address. A coworker proposes replacing the gateway. Before going that far, write down the address the visitor's hostname actually returned. Compare it to the current service entry. If the two addresses differ, a real gateway can faithfully serve the new address while visitors continue trying the old one.
The next check should name a precise operation. Use an authorised external or equivalent test source and request the known hostname and expected page. The hostname is important because a server can host several websites on one address. With ordinary HTTPS, a client supplies a TLS server name and verifies a certificate before exchanging HTTP. Simply requesting the numeric address can reach a different virtual host or fail the certificate check. When an approved test temporarily overrides name resolution, preserve the expected hostname and certificate validation, then repeat the usual request after any real DNS change. Do not treat disabling certificate verification as a successful site test.
Separate old cached results from a destination that never worked. DNS records have cache lifetimes, and a particular client can receive an older answer for a time. Record the response and resolver context with the time you tested. Comparing the same name at two resolvers can produce different legitimate observations during a transition. Updating a record is different from observing the result through the resolver path your actual users rely on. If a managed public entry replaced the instance, use its approved current hostname configuration rather than keeping records tied to an individual changing EC2 public address.
Now try a second incident with the same headline. Everyone has the expected current public address, and the IGW and route match. The web program listens on guest loopback only, so an operating-system check can succeed without the program being reachable on the instance's private interface. The SG and ACL can allow the exact web traffic while the listener still prevents the ordinary external connection. Collect the service's configured bind address and port. A scoped listener correction and retest operates at a different boundary from a public firewall change. Keep public entries limited to the roles that actually need them.
A third incident shows a reply reaching the client from the wrong website. That is evidence about a responding server but does not confirm which site should answer. Compare the exact HTTPS name, matching address, selected public entry, active virtual host and content marker. A browser can display a generic page from another virtual host even after a valid network exchange. The active site selection belongs to the web or service configuration. Do not redesign internet routes just because the application returned content whose title you did not expect.
With each incident, note the smallest useful comparison. The old public DNS target versus current association identifies stale addressing. The guest loopback listener versus the required private-interface listener identifies a host binding issue. The actual response marker versus the expected site identifies a routing or application-selection problem at the entry. The broad headline website down can describe all three. Test evidence saves the operator from treating each problem as loss of internet-gateway attachment, especially in an account where that component serves several projects.
Choose direct ingress, outbound access, or a controlled private path
Consider three different requests for the centre. Families need the public timetable. A private worker periodically contacts a software repository. A staff member needs authorised administrative access. A common mistake is to add public addresses to every machine to satisfy all three. Start with the role and initiator. The visitor initiates to the public entry. The worker initiates to the specific dependency when policy permits. Staff can use an approved management path. Their browser's success reading the public timetable does not prove administrative connectivity, and administrative access does not require the enrolment app to accept all public connections.
The public entry can be a dedicated web server, or a managed public load balancer that establishes private connections to application targets. With the managed entry, the Internet-facing path belongs to its suitable public subnets and configuration. The app instances can retain only private addresses as appropriate. An end user test might establish that the manageability of the public service improved, while a direct laptop connection to an app private address still has no expected path. Verify the intended boundary, rather than treating lack of direct access to each target as a broken website.
For the repository path the operator must first know which service the worker contacts. If the dependencies are selected AWS services served through an available private endpoint design, an internet path may be unnecessary. If the dependency needs ordinary public IPv4 and the team approves that, a public NAT gateway can support the private workload's initiated connection under suitable routing and policy. The outside service's response then returns through the translation path. A decision about outbound repositories is not the same decision as where to host the public website. Make each entry in the worksheet describe one operation so readers can distinguish the justification.
In another design, the private application sends traffic to a proxy on a connected business network. The VPC could have no ordinary internet gateway for that application's intended path. The proxy has its own connectivity, policies and service responsibilities. Confirm the actual route from the worker to the proxy and the permitted operation through it. Having no direct gateway association does not prevent all forms of external communication. Direct connectivity is a topology property; what an application can do also depends on intentional intermediaries and credentials. Review those intermediaries when the team states a security requirement.
Staff access may use a team-approved private connection or managed access with proper IAM identity and prerequisite service connectivity. Draw the path separately from the public application. If the selected workflow has an internet-facing step for a management service, that fact does not mean the managed instance needs a public interface. Check the chosen management architecture rather than assuming it works in every subnet. Restrict the allowed network and identity scope to the team's actual operating need and record which owner can verify access. A legitimate administration path should be tested under the normal role rather than a stronger identity that hides a missing policy.
Finish the worksheet with an expected result for every allowed operation and a sensible control. The visitor expects the approved timetable page after HTTPS. The worker expects the required package or signed artifact from its real source under policy. The staff member expects an authorised management session or login under the intended identity. The data service remains accessible only on its planned private path. If one operation fails, these distinct statements make it clear where to investigate. Do not create additional public paths to make a test easier when the required operation is supposed to exercise a private one.
When a network owner uses AWS Reachability Analyzer, understand which question it can answer. It evaluates supported resources and paths based on their network configuration. For a supported analysis, its result can help locate routes or policy that make a path unavailable. It does not send a visitor's actual HTTPS request, check the site's certificate or execute the timetable handler. Use it as supporting inventory evidence under the organisation's permissions and pricing. Then choose a permitted real service check for the part that configuration analysis cannot observe.
Save a simple before-and-after record for an owned change. Keep the gateway and VPC identifiers, effective table, address-family decision, current public entry and expected web operation. The final result should include the actual client response and any control that matters to a neighboring workload. If you are only reviewing a plan, record the boundaries that remain untested. A precise limit makes the evidence more useful later.
Explain what the public gateway evidence proves
An EC2 instance has a public IPv4 address. Is its private subnet now public?
The address alone does not configure the subnet's routing. Check the effective route table for the intended direct internet-gateway path and confirm the gateway attachment. The interface's public IPv4 mapping and its network permissions are separate facts. In many architectures the app is meant to stay private and receive requests only from a load balancer.
Where is the public IPv4 address visible if the guest listener uses a private address?
The EC2 and network interface inventory shows the public IPv4 association. The guest normally sees its private interface address. The gateway supplies logical one-to-one IPv4 mapping for the direct path. I would check the guest listener fits the internal interface and inspect the actual public endpoint or DNS record from the outside.
Can the usual gateway and an egress-only gateway do the same job?
An ordinary internet gateway can support eligible direct IPv4 and IPv6 traffic in both directions under the configured path and controls. An egress-only internet gateway supports IPv6 initiated from the VPC and its replies, rather than ordinary direct public service entry. I would choose the path after identifying the traffic family, address type and initiator.
What would you check if the gateway, route and address are all correctly set but HTTPS fails?
I would confirm the chosen hostname and family, applicable account and network rules, and whether the correct host or load balancer listens with the intended TLS and HTTP setup. I would also distinguish a timeout, a certificate warning, and an HTTP response. Each supplies a different kind of evidence about where the request reached.
Identify the next missing condition
Why does a VPC with one attached internet gateway usually not need a second for another public subnet?
Answer and reasoning
Suitable subnet routes in the same VPC can target that shared AWS-managed gateway. Check each subnet association and the intended path. One ordinary internet gateway can be attached to a VPC at a time.
The correct gateway route is in table A, but the subnet is associated with table B. Does the workload use A?
Answer and reasoning
No. Read the subnet's effective association. An unassociated route does not apply to the instance just because the destination and gateway IDs are correct elsewhere.
An already running instance has no public IPv4 address. Does changing its subnet's auto-assign setting attach one immediately?
Answer and reasoning
The setting affects eligible future launches. Inspect the actual instance's addressing and choose an approved association or deployment path if it needs one. The route and access rules remain separate decisions.
Which direct gateway should receive the route for a web listener that the internet must initiate over IPv6?
Answer and reasoning
Use the ordinary internet gateway path under the appropriate public IPv6 addressing, routes and policies. An egress-only internet gateway serves initiated outbound IPv6 and return traffic, not new outside connections to a public listener.
Revision cards for direct internet paths
Gateway and table
Confirm attached gateway ID and the effective subnet route table. Find an applicable route for the destination and family.
IPv4 mapping
The guest uses private addressing and the direct gateway path can map a suitable public IPv4 address. Check the actual association and DNS.
IPv6 direction
Check separate address, route, policy and listener. Use egress-only IPv6 where the workload should initiate, under the supported addressing model.
Useful public response
Verify the named HTTPS endpoint from the intended client and look for the expected result. Distinguish reachability, policy, certificate and application behavior.
Official references
- Internet gateways, IPv4 mapping and IPv6 routes
- AWS gateway attachment and route setup
- AWS gateway route-table associations and limits
- Effective subnet route-table behavior
- Egress-only IPv6 routing
- Public and private IPv6 address behavior
- VPC Block Public Access modes and exclusions
- EC2 stop/start and automatic public IPv4 lifecycle
- Elastic IP addressing and lifecycle
- AWS VPC and public IPv4 pricing
- AWS Reachability Analyzer capabilities and limits