DEV Community

Arslan Zaheer
Arslan Zaheer

Posted on

AWS Network Firewall internet firewall mode: rethinking VPC egress

Egress control is one of the least loved parts of most AWS estates. Ingress gets the attention because that is where the obvious attacks arrive. Outbound traffic is often left to a NAT gateway, a broad security group and a vague hope that nothing inside the VPC is talking to somewhere it should not be. Two AWS announcements this week make it noticeably easier to fix that, and I think they deserve more attention from CTOs and security leads than they will probably get.

What AWS announced

First, AWS has introduced an automated internet firewall mode for AWS Network Firewall, currently in Preview. In this mode, Network Firewall takes rules you define centrally and applies them to traffic at the internet gateway of each of your VPCs. It also handles network address translation itself for outbound-only connections, and a subnet that needs internet access requires only a single route.

Second, AWS has launched a Next Generation policy for AWS Network Firewall. The aim is to let security teams do two things at once: restrict traffic to what each application actually needs, and inspect every connection that is allowed for known threats. For context, Network Firewall is AWS's managed firewall service; it tracks connection state and includes intrusion detection and prevention capabilities.

Those are the facts as published. The rest of this piece is my view of what they mean in practice.

Why this matters more than it looks

Fewer moving parts in the route table

The traditional pattern for inspecting outbound traffic in AWS involves firewall subnets, NAT gateways, carefully ordered route tables and, in multi-account setups, often a centralised inspection VPC behind a transit gateway. It works, but it is easy to get wrong. A common failure mode is a subnet that quietly routes around the firewall because a NAT route was added during an incident and never removed.

If a subnet needs only one route and the firewall performs the NAT for outbound-only connections, there is simply less to misconfigure. Less routing complexity means fewer places for a bypass to hide, and a much easier story to tell an auditor.

Central policy, local enforcement

Applying centrally defined rules at each VPC's internet gateway is the model most security teams actually want. The platform or security team owns the policy; application teams do not have to build or maintain inspection plumbing. That separation matters for scale-ups where every new product team spins up its own VPC and nobody wants to be the person who signs off on each one by hand.

Allow-listing plus inspection, not one or the other

In my experience, teams usually pick between two imperfect options. Either they write tight allow lists and accept that allowed traffic is trusted, or they run broad threat signatures and accept that almost anything not obviously malicious gets through. The Next Generation policy is pitched at combining both. If it delivers on that, it closes a real gap: an allowed destination is not the same as a safe connection.

AI agents make egress a first-class control

This is the part I care about most. AI agents and tool-using LLM applications make outbound network calls by design. They fetch documents, call APIs and, if compromised through prompt injection, can be persuaded to send data somewhere they should not. Application-layer guardrails are necessary, but they are not sufficient on their own. A network layer that only permits the destinations an agent genuinely needs is one of the few controls that still holds when the model has been talked into doing something unwise.

If you are running agents on AWS today without meaningful egress restrictions, these announcements remove a lot of the excuse for leaving it that way.

The risks and open questions

I would not rush to rebuild production networking around this yet. My cautions:

  • It is a Preview. Preview features can change, and they are not where I would put regulated or customer-critical workloads. Treat it as something to evaluate, not something to depend on.
  • Cost needs modelling. The announcement does not change the need to understand what per-VPC inspection will cost against your current NAT gateway and centralised inspection spend. Do the sums with your own traffic volumes before committing.
  • Migration is the hard part. Moving from an existing inspection architecture is where outages happen. Expect to run old and new patterns side by side for a while.
  • Central rules can break things centrally. A single policy applied everywhere is powerful, and one bad rule change now affects every VPC at once. You need change control and staged rollouts for firewall policy just as you would for application code.
  • Allow lists rot. Restricting traffic to what each application needs only works if someone keeps that list current. Without ownership, teams will widen rules under pressure and nobody will narrow them again.

What I would do this week

This is my practical advice for a team that wants to move without taking unnecessary risk:

  • Map your current egress paths. List every route to an internet gateway or NAT gateway across your accounts. You are looking for subnets that bypass inspection today; surprises are common.
  • Identify your highest-risk outbound workloads. AI agents, anything handling customer data, and build systems with broad internet access should sit at the top of the list.
  • Stand up the Preview in a sandbox account. Build a small VPC that mirrors a real workload, apply a centrally defined policy, and test both the single-route model and the built-in NAT behaviour.
  • Draft an allow list for one agent workload. Work out exactly which destinations it needs. The exercise alone is valuable, because it usually reveals dependencies nobody had documented.
  • Evaluate the Next Generation policy against your current rules. Check whether combining allow-listing with threat inspection lets you simplify your existing rule groups rather than layering more on top.
  • Agree ownership and change control. Decide who owns central firewall policy, how changes are reviewed and how rollouts are staged before you have a production dependency on it.
  • Write down the decision criteria for adoption. General availability, cost per VPC, logging and integration with your existing detection pipeline are the questions I would want answered before production use.

Where this fits

Network controls are not glamorous, but they are the layer that keeps working when everything above it misbehaves. With agents now making their own outbound decisions, egress policy has moved from hygiene to a core part of how you contain AI risk. These two releases make a cleaner design achievable for teams that previously found it too fiddly to bother with.

If you want a second pair of eyes on your VPC egress design, or help planning a staged move to centrally managed inspection, that is the kind of work I do through my cloud architecture service.

If this is on your list for the coming quarter, book a kickoff call and we can work through your current setup together.


Arslan Zaheer is an independent Principal Solutions Architect for AI, cloud and security. More at arslanzaheer.com.

Top comments (0)