Published · Updated

Shadow AI in AWS: Route 53 DNS Signals, VPC Flow Logs and Egress Boundaries

Detect unsanctioned AI destinations with Resolver and flow evidence while testing encrypted DNS, shared endpoints, attribution and blocked-route gaps.

A DNS lookup for an AI provider is an investigation signal, not proof that a user sent data to a model. Conversely, no matching DNS event is not proof that no AI API call occurred. Start with a defined workload boundary and a sanctioned destination register, then measure the visibility and enforcement gaps.

Decision inputCollect or demonstrateAcceptance evidenceUnresolved condition
Workload populationVPCs, subnets, ENIs and service identitiesTimestamped scope registerUnmanaged account or developer device
Name visibilityResolver query-log associations and delivery healthApproved synthetic query observedCached names, alternative resolver or encrypted DNS
Connection visibilityFlow logs and actual egress routingControlled connection correlated to source ENIMissing routes, unsupported traffic or log delivery gap
EnforcementDNS, proxy or firewall policy on the selected pathAllowed and denied fixturesDirect IP, proxy bypass or alternate path

Architecture and data flow

Approved workload -> controlled resolver + egress route -> approved service
          |                    |
          v                    v
    identity inventory   DNS / flow / firewall observations
          \____________________/
                    |
          bounded investigation record

AWS DNS Firewall filters DNS queries through the VPC Resolver by domain; it is not an HTTPS content inspection service. VPC Flow Logs provide connection metadata, not the prompt, URL path or identity inside a TLS request. Pair these observations with workload identity and application records only where that collection is authorized.

Build a destination register before a block list

For every sanctioned AI service, record domains, endpoint/API type, owner, approved data classes, account or tenant, expected route and exception expiry. Distinguish hosted AI APIs from internal model endpoints and shared cloud/CDN services. A public domain list ages quickly and can have false positives; do not turn a copied list into an unreviewed production deny policy.

Enable query-log delivery for the agreed VPC population and verify the actual association and destination permissions. Run a synthetic lookup from each relevant workload class. Query caching and resolver behavior can reduce repeated DNS observations; absence of one event must be evaluated against that limitation. Preserve collection failures separately.

For flow correlation, maintain time-bounded ENI-to-workload inventory. NAT, proxies, shared nodes and connection reuse can make a source IP insufficient to identify a person or container. Record uncertainty rather than assigning every request to the instance owner. Use an approved egress proxy/application identity when more precise attribution is required.

Test enforcement on the actual route

Begin in observation mode with owners reviewing suspected destinations. Introduce a narrow, reversible policy for one workload group only after the business and security owners agree on allowed services. Select DNS Firewall, Network Firewall, an authenticated proxy or workload controls according to the required boundary, not because one service can see all traffic.

Exercise a permitted domain, a denied domain, an unclassified destination, a cached connection, direct-IP traffic and an attempted alternative or encrypted DNS path. If those paths are possible, control them through routing and egress policy rather than claiming DNS-only enforcement. Consider service endpoints, IPv6, peering and proxy routes where present. Log the policy decision and measure propagation/recovery for the selected enforcement mechanism.

Investigation fieldExample meaning
Workload referenceRestricted link to timestamped inventory
Destination classificationSanctioned, unclassified or denied
Observed DNS/flow recordsSource record IDs and time window
ConfidenceCorrelated endpoint signal, not prompt inspection
Owner decisionApproved exception, remediation or further investigation

Do not store prompts, API keys or personal browsing histories in the destination register. An employee monitoring use case needs its own authorized policy and scope; this playbook addresses agreed AWS workload boundaries.

Production Pitfalls

A block can fail open or fail closed depending on the configured service and failure mode. Test that behavior and the recovery path; an outage in the resolver or inspection route must not produce an unexplained business outage. A new domain, alternate account or newly attached VPC can escape yesterday’s scope, so compare the current population with the approved register.

A detected external connection does not establish data exfiltration or the content classification. Escalate it as a signal with supporting records and uncertainty. Preserve denied-source and missing-log conditions instead of interpreting empty searches as clean results.

The existing bounded inspection example inventories the DNS Firewall surface; it does not deploy the entire architecture or block traffic. Its scope manifest records the original collection boundary. For identity-level controls, follow the MCP authorization guide.

Scope an Evidence Sprint at $9,500–$14,500 or NIST hardening from $2,950 around one approved boundary and specific positive/negative fixtures. A destination dashboard alone is not evidence of complete AI governance.

Continue with the AI infrastructure topic, the AI / LLM observability and MCP security kit and the source documentation for the retained inspection.

Frequently asked questions

Do DNS logs prove a prompt was sent to an AI provider?

No. They show observed name queries within their coverage. Combine authorized network and application evidence, and preserve uncertainty about request content and caller attribution.

Can DNS Firewall block every external AI call?

No. It filters DNS through the VPC Resolver. Review cached connections, alternate or encrypted resolvers, direct-IP traffic and other egress routes.

Does a clean flow-log search prove no shadow AI exists?

No. Verify the workload population, routes, collection health, time window and visibility limitations before interpreting an empty result.

Browse all writing · RSS feed

Tymur Chmeruk

Written by

Tymur Chmeruk

Cloud Security & Infrastructure Engineer · Baltimore–Washington Metro · [email protected]