AI, LLM and real-time · AI gateway · multi-cloud

Sovereign LLM gateway for government: one policy point across Bedrock, Azure OpenAI, Vertex AI and self-hosted models

A central AI gateway that every agency application calls instead of a model provider. It authenticates the caller, applies policy and PII redaction, routes each request to an approved Australian-region model, enforces budgets and writes a tamper-evident audit record.

A reference architecture from EITSAA, not a named client system. Service limits, prices and product features change, so confirm current details before you commit to a design.

  • ACSC Essential Eight
  • Australian Government ISM
  • Protective Security Policy Framework (PSPF)
  • SA Information Security Management Framework (ISMF)
  • Voluntary AI Safety Standard
  • Australian data residency

Architecture

Architecture diagram. Tinted boundaries show regions, accounts, networks and trust zones. Numbered arrows match the flow below.
Sovereign LLM gateway for government: one policy point across Bedrock, Azure OpenAI, Vertex AI and self-hosted models architectureAgency apps and agents to AI gateway: HTTPS + token. AI gateway to Policy engine: authorise. AI gateway to PII redaction: inspect. PII redaction to Model router: clean prompt. Model router to Amazon Bedrock: PrivateLink. Model router to Azure OpenAI: Private Link. Model router to Vertex AI: PSC. Model router to Self-hosted open models: in-VPC. AI gateway to Audit store: auditAgency applicationsAgency AI gateway · AWS ap-southeast-2 · private VPCApproved modelproviders · AustralianregionsAgency apps andagentsWorkload identity, no providerkeysAI gatewayOpenAI-compatible API, authn,quotasPolicy engineOPA or Cedar: use case, dataclass, modelPII redactionDetect, mask, tokeniseModel routerClassification-aware, fallback,cacheAudit storeS3 Object Lock, signed recordsAmazon BedrockSydney, PrivateLinkAzure OpenAIAustralia East, regionaldeploymentVertex AIaustralia-southeast1Self-hosted openmodelsvLLM on GPU nodes, in-VPC1HTTPS + token2authorise3inspect4clean prompt5PrivateLink6Private Link7PSC8in-VPC9auditPlatform servicesIdentityprovider (SSO)Monitoring andalertsAudit logKey management(KMS)
  • Compute and containers
  • Network and edge
  • Security and identity
  • AI and ML
  • Monitoring, audit and analytics
  • Request or data flow
  • Asynchronous or optional
  • Boundary: region, account, network or trust zone

Request and data flow

  1. An agency application calls the gateway with a short-lived workload token (OIDC federation from Entra ID or the agency IdP). Applications never hold provider API keys, so rotating or revoking a model is a gateway change, not an application release.

  2. The gateway asks the policy engine whether this application, for this registered use case and this data classification, may use this capability. Policy is code in a versioned repository, so changes are reviewed and testable.

  3. The request body is inspected for personal and sensitive information (names, addresses, Medicare and tax file numbers, case identifiers). Depending on policy it is blocked, masked or replaced by reversible tokens held in the gateway.

  4. The sanitised prompt goes to the router together with the data classification and the use case's approved model list.

  5. For general workloads the router sends to Amazon Bedrock in Sydney over an interface VPC endpoint. Bedrock does not use customer prompts to train base models, and the endpoint policy limits which models can be called. Check whether each model is served in-region or through a cross-region inference profile.

  6. For use cases bound to Microsoft tooling, the router calls an Azure OpenAI regional deployment in Australia East over a private endpoint. Use regional (Standard) deployments and confirm the data processing location for the chosen model.

  7. Where a model is only offered on Google Cloud, the router calls Vertex AI in an Australian region through Private Service Connect. Model availability by region differs, so the routing table is checked against the provider's current regional list.

  8. Higher-classification or high-volume workloads go to open-weight models on the agency's own GPU nodes with no provider hop at all. The router prefers this tier when the policy says data must not leave the account.

  9. Every request writes a signed audit record (caller, use case, policy decision, model, token counts, redaction actions, response hash) to an Object Lock bucket. Prompt text is stored only if policy requires it and is encrypted with a separate key.

Components and why they were chosen

ComponentWhat it doesWhy this choice
AI gateway (Kong, Envoy AI Gateway, LiteLLM Proxy, Azure API Management or API Gateway)Single OpenAI-compatible entry, authentication, quotas, streaming and request IDs.Standardises the API so models can change without application change.
Policy engine (OPA or Cedar)Decides allow, deny, redact or downgrade by caller, use case, data class and model.Policy as reviewed code, with decision logs for audit.
PII redaction (Amazon Comprehend, Azure AI Language, Microsoft Presidio or a custom detector)Finds and masks personal information in prompts and responses.Data minimisation before data reaches any provider.
Model routerChooses provider by classification, capability, cost, latency and health, with fallback and semantic cache.Avoids lock-in and gives sovereignty a control point.
Amazon Bedrock with GuardrailsManaged foundation models in Sydney with content and topic filters.Fast access to current models with no GPU operations.
Azure OpenAI ServiceRegional deployments in Australia East.Required where agencies standardise on Microsoft.
Vertex AIGemini and partner models in Australian Google Cloud regions.Capability coverage and negotiation leverage.
Self-hosted open-weight models (vLLM)Full control of weights, data path and cost at volume.Meets the strictest residency and classification needs.
Audit store (S3 Object Lock, CloudTrail Lake or a SIEM)Immutable decision and usage records.Supports investigation, FOI and cost allocation.

Design decisions and trade-offs

Gateway or direct SDK calls

All model traffic goes through the gateway, enforced by network controls and provider-side restrictions.

Why. One place for policy, redaction, budgets and evidence.

Trade-off. The gateway becomes critical infrastructure and needs multi-AZ capacity and its own on-call.

Where to redact

In the gateway, before the router, with per-use-case policy.

Why. Agencies cannot trust every application team to redact consistently.

Trade-off. Detection is imperfect. Treat redaction as a layer, not a guarantee, and test with agency-specific identifiers.

Routing basis

Data classification and approved-model list first, then cost and latency.

Why. Sovereignty and classification are constraints. Cost is an optimisation inside them.

Trade-off. Smaller candidate sets for sensitive data mean less choice and sometimes weaker models.

Network path to providers

Private endpoints (PrivateLink, Private Link, Private Service Connect) with no public egress from the gateway VPC.

Why. Removes the internet from the data path and simplifies egress approval.

Trade-off. Endpoint and DNS design per provider, and some features arrive on public endpoints first.

Prompt logging

Metadata always, content only when the use case's policy requires it, encrypted with a dedicated KMS key.

Why. Logs themselves become a store of sensitive data and a records and FOI subject.

Trade-off. Less content makes incident analysis harder. Allow time-boxed content capture for investigations.

Well-architected pillars

Security

Workload identity, deny-by-default policy, private endpoints, KMS keys per classification, endpoint policies that name allowed models, WAF in front of any public entry, and no provider keys in application code.

Reliability

Stateless gateway across three AZs, health-checked provider pools, circuit breakers and fallback to a second approved provider where classification allows, and graceful degradation to queued or human handling.

Performance

Streaming responses, connection pooling, exact and semantic caching for repeated prompts, and region-local providers to keep latency low.

Cost optimisation

Per-team budgets and token quotas, model tiering by task, caching, committed throughput only after measured baselines, and showback reports.

Operational excellence

Gateway and policy deployed from Git with canary releases, synthetic probes per provider, and a kill switch per model and per use case.

Sustainability

Route routine tasks to small models, cache aggressively and scale self-hosted GPU capacity to demand.

Network, identity and data

Networking

The gateway lives in private subnets across three AZs behind an internal load balancer reached over Direct Connect, Site-to-Site VPN or Transit Gateway from agency networks. Interface endpoints reach Bedrock, Secrets Manager and KMS. Azure OpenAI and Vertex AI are reached over private connectivity where the agency has it, otherwise through a single egress path with FQDN allow-listing and TLS inspection. No other internet egress is allowed.

Identity and least privilege

Applications authenticate with workload identity federation (OIDC) and receive scoped tokens carrying application, use case and classification claims. The gateway uses its own roles per provider with least-privilege, short-lived credentials. Administrators use phishing-resistant MFA and just-in-time elevation, and policy changes require two reviewers.

Data and encryption

Classify the data before it reaches the gateway and carry the label as a claim. Keep prompts and responses inside Australian regions, record where each provider processes data, and retain audit records under the applicable records authority. Do not allow providers to retain prompts beyond abuse monitoring where an opt-out is available, and document any residual retention in the privacy impact assessment.

Security and compliance mapping

ControlHow this design addresses it
Restrict administrative privilegesJust-in-time admin, separate break-glass, no standing provider keys. Essential Eight.
Application control and patchingImmutable container images, signed builds and a monthly patch cadence for the gateway. Essential Eight.
Event logging and monitoringSigned audit records and policy decision logs support ISM event logging guidance and agency SIEM ingestion.
Data residency and sovereigntyRouting policy restricts sensitive classes to Australian regions and verifies provider processing locations. Supports PSPF information security and SA ISMF requirements.
Human oversight and transparencyUse-case register, risk tier and approvals align with the Voluntary AI Safety Standard guardrails.

Mappings show how the design supports each control. They are not certifications, and EITSAA does not claim IRAP assessment or compliance for any reference architecture.

Failure modes, targets and scaling

  • Target RTOUnder 1 hour for the gateway, with provider failover in minutes
  • Target RPONear zero for audit records, which are written synchronously to durable storage
  • Scaling and limitsBounded by provider quotas. Request quota increases early and enforce per-team concurrency limits in the gateway.
Failure modeMitigation
A provider region is degraded or throttlingCircuit breaker, retry with backoff and fallback to a second approved provider for the same classification, otherwise queue or fail clearly.
Redaction misses an identifierSecond-pass response scanning, sampling reviews, provider-side guardrails and a documented incident path for suspected leakage.
Policy bug blocks a critical servicePolicy tests in CI, canary rollout and an emergency override that is logged and time-limited.
Gateway outageMulti-AZ, health checks and a documented manual degraded mode. Applications should handle model unavailability, not assume it.
Runaway spend from a loopPer-key budgets with hard cut-off and alarms on token rate.

Observability and runbooks

  • Request, error and latency metrics per provider, model, application and use case.
  • Policy decision counts, denials and redaction rates with trend alerts.
  • Token and cost reporting by team and use case for showback.
  • Synthetic canary prompts per provider to detect regional degradation and model behaviour change.

Cost drivers and levers

Model tokens, provisioned throughput, gateway compute, GPU capacity for self-hosted models and log storage.

  • Tier models by task and route routine work to small models.
  • Cache exact and semantic repeats.
  • Buy committed throughput only after baselines exist.
  • Move steady high-volume work to self-hosted models when utilisation justifies the GPUs.

Implementation and fit

Phased approach

  1. Register use cases and define data classes, risk tiers and the approved model list.
  2. Stand up the gateway with one provider, authentication, audit and budgets.
  3. Add redaction, policy-as-code and a second provider with fallback.
  4. Add the self-hosted tier for higher classifications and onboard applications through a self-service process.

Anti-patterns to avoid

  • Every team holding its own provider keys.
  • Treating a single provider's content filter as the policy layer.
  • Logging full prompts to a general-purpose log index.
  • Routing by cost before classification.
  • No tested fallback, only a diagram of one.

When to use it

  • Departments or whole-of-government programs with several AI use cases and mixed data classes.
  • Organisations that must prove where data went and who approved each use.

When not to

  • A single pilot with one low-risk use case where a managed service is enough.
  • Teams with no capacity to operate a critical shared service.

More in ai, llm and real-time

Related insights

Discuss this architecture

Tell us your systems, constraints and timeline. We reply within one business day, and the initial conversation is free.