Implementation guidance · Deployment-ready proof of concept

Guidance for an India-Controlled Generative AI Gateway on AWS

Summary: This guide adapts the AWS multi-provider generative AI gateway for an Indian bank. It keeps LiteLLM’s unified API, routing and operational controls, while adding a bank-owned admission layer for identity, a stateless Responses API, direct Mumbai-region model access, sensitive-data screening, hard budget checks, policy decisions and request-level evidence.

Implementation status

The gateway application, dashboard, AWS CDK stacks, deployment scripts and security checks are implemented and locally validated. This page does not claim that models, quotas, certificates, domain names or AWS resources already exist in the target account; those remain live deployment gates.

Runtime Region
Asia Pacific (Mumbai), ap-south-1
Proposed portal
aigateway.ajitsury.people.aws.dev
Runtime
Private ECS on AWS Fargate
Developer API
POST /v1/responses
Inference boundary
Direct regional models only
Implementation state
Code complete; account deployment pending

#Overview

Bank applications can already integrate with generative AI independently. The resulting problem is not simply model access: every application can make different decisions about credentials, models, regions, sensitive data, budgets, retries and logging. The bank then has no consistent answer to who used a model, why that model was selected, what controls ran, what the call cost or why it was refused.

This guidance introduces one governed admission point. Browser users authenticate through Amazon Cognito, application traffic enters through a protected API, and private Fargate tasks run the banking policy middleware and LiteLLM. Only approved direct Amazon Bedrock model identifiers available in ap-south-1 can be invoked. An optional bank-hosted SageMaker route and a cold ap-south-2 recovery stack are conditional extensions, not hidden or automatic fallbacks.

The problem in one sentence

Teams can use AI today, but the bank cannot consistently prove who used which model, what controls ran, where inference occurred, what it cost or why a request was refused.

Design principles

01

One governed API

Applications use a stable request format and bank-owned model aliases.

02

Region is enforced

Direct India-region destinations are explicit; global and geographic inference profiles are denied.

03

Deny before inference

Identity, model, sensitive-data, rate and budget checks precede the provider call.

04

Evidence without content leakage

Audit records capture decisions and usage without retaining raw banking prompts.

Target use cases

  • Customer-information assistant: Answers general product and service questions using synthetic demonstration data.
  • Employee assistant: Uses approved model aliases with team budgets and stricter access controls.
  • Developer integration: Provides an OpenAI-compatible API with normalized errors and request IDs.
  • AI governance: Gives operations teams one place to inspect model use, refusals, spend and control effectiveness.
Intentionally out of scope

The initial proof of concept does not provide lending decisions, financial advice, transaction execution, autonomous tools, customer-document processing or real banking data.

#Features and benefits

The published AWS guidance positions LiteLLM as a broad multi-provider gateway. This design keeps the capabilities that are useful for the bank, constrains features that could violate the regional boundary, and adds controls that remain independent of LiteLLM configuration or licensing.

9Implemented in the MVP
2Implemented with regional restrictions
1Implemented only at gateway level
#LiteLLM capabilityBank implementationBrowser-demo evidenceStatus
1Unified API/v1/responses is the primary stateless contract; /v1/chat/completions remains a compatibility route.One request works with multiple approved aliases.Restricted
2Model routingThe client selects a bank alias; identity entitlement, region, token and budget policy determine whether its configured direct route is allowed.The model picker switches between approved aliases without exposing provider IDs.Included
3FailoverMVP fallback stays between approved direct models in ap-south-1; ap-south-2 requires a separately deployed cold stack.A deterministic scenario proves the backup route and evidence path; LiteLLM separately configures retryable primary-to-backup fallback.Restricted
4Load balancingThe ALB can balance Fargate tasks. The cost-controlled demo runs one task; productionResilience=true runs two. Model balancing is used only when approved equivalent destinations exist.Health and request metrics remain visible; multi-task balancing is a resilience-profile test.Conditional
5AuthenticationCognito authorization-code flow with PKCE authenticates browser users. Machine-client credentials and virtual-key administration are a later extension.Unauthenticated API access is refused; an administrator-created pilot user can sign in.Included
6Security controlsWAF, deterministic Indian identifier patterns and mandatory Bedrock Guardrails.Synthetic PII is blocked or masked.Included
7Rate limitsRedis-backed requests-per-minute and concurrency controls by resolved identity and team. Token-per-minute enforcement is a later extension.The deterministic rate-limit scenario returns HTTP 429 without a provider call.Included
8Cost controlsPre-call reservation, explicit price map and post-call settlement.An exhausted budget is refused before inference.Included
9Logging and auditMetadata-only evidence in PostgreSQL with encrypted, Object Lock-enabled S3 archival.Selecting the request ID retrieves its persisted content-free decision record.Included
10CachingTenant-aware Redis cache for approved, non-personalized FAQs only.The second safe request is a visible cache hit.Included
11ObservabilityCloudWatch receives latency, request, token, estimated-cost, policy, cache and failover metrics; alarms cover API 5xx responses and unhealthy private targets.The request metrics and persisted decision update after each scenario.Included
12Policy enforcementModel allowlists, IAM restrictions, required Guardrail, tool restrictions and fail-closed decisions.A global or unknown model request is denied with zero provider cost.Included

LiteLLM responsibility versus bank responsibility

AreaLiteLLM contributionBank-owned extension
API normalizationOpenAI-compatible Responses and Chat Completions endpoints, provider adapters and normalized errors.A stateless Responses subset, controlled aliases and application-specific metadata.
RoutingRetries, cooldowns, fallbacks and model groups.Direct-region allowlist, business priority, intended-use rules and fail-closed outcomes.
IdentityLiteLLM can provide virtual keys, teams, user records and model permissions.The MVP uses Cognito login and trusted gateway identity mapping; machine-client key issuance is deferred.
Usage controlsSpend tracking and RPM/TPM limits.PostgreSQL-authoritative cost reservation, unknown-price rejection and request evidence.
SafetyGuardrail integrations and callbacks.IAM-enforced Guardrail, Indian identifier patterns and content-free telemetry.
GovernanceOperational model and key administration.Approved-model inventory, owners, risk tiers, policy versions and suspension decisions.

#Architecture overview

The static portal and inference API use separate paths. CloudFront and a CloudFront-scope WAF web ACL deliver only the portal from a private S3 origin using Origin Access Control. The browser then calls a Regional REST API at api.aigateway.ajitsury.people.aws.dev, protected by a Regional WAF web ACL and a Cognito user-pool authorizer. API Gateway connects through VPC Link V2 over HTTPS to private DNS and an internal load balancer. TLS terminates at the ALB; the final security-group-restricted hop to the task uses HTTP inside the isolated VPC. Fargate tasks have no public IP, NAT Gateway or internet route.

Architecture steps

  1. 1

    A user opens aigateway.ajitsury.people.aws.dev. Route 53 resolves it to CloudFront, whose WAF-protected distribution reads the dashboard from a private S3 bucket through signed OAC requests.

  2. 2

    The single-page application redirects the user to Amazon Cognito and completes an authorization-code flow with PKCE. Static HTML can load publicly; business data and inference remain inaccessible without a valid token.

  3. 3

    The dashboard sends POST /v1/responses to the separate Regional API hostname using the short-lived Cognito token.

  4. 4

    The Regional WAF inspects the API request. API Gateway REST validates the request and Cognito token, then forwards it through VPC Link V2 to an internal Application Load Balancer.

  5. 5

    The ALB sends traffic to the private Fargate service. The demo profile runs one task to reduce baseline cost; the resilience profile runs two tasks across separate Availability Zones.

  6. 6

    The banking middleware resolves identity and model alias, checks regional policy, applies deterministic screening, reserves budget and evaluates rate limits.

  7. 7

    The policy gateway translates the stateless Responses request to LiteLLM’s Chat Completions interface. LiteLLM invokes either an approved direct Bedrock model through the Bedrock Runtime VPC endpoint or the explicit bank-self-hosted SageMaker route when that optional endpoint is enabled.

  8. 8

    For Bedrock routes, the gateway uses a pinned Guardrail for pre-screening and model input/output evaluation. IAM prevents an approved model invocation from silently omitting the required Guardrail.

  9. 9

    PostgreSQL is authoritative for teams, budget reservations, usage evidence and the archive outbox. Alias and policy configuration is version-controlled with the deployment. Redis holds short-lived rate and concurrency counters plus eligible cache entries.

  10. 10

    Metadata-only evidence is archived to an encrypted, versioned, Object Lock-enabled S3 bucket while CloudWatch receives operational metrics and content-free logs.

No Global Inference or runtime cross-Region routing

The primary gateway accepts only bank aliases mapped to directly invocable ap-south-1 model IDs or an explicitly approved regional SageMaker endpoint. Global and geographic inference-profile identifiers, arbitrary provider IDs and unapproved external endpoints are denied by middleware and IAM. A future ap-south-2 stack uses direct Hyderabad resources and is not Global Inference.

What “India-controlled” means

CloudFront, Route 53 and a CloudFront-scope WAF are global services used only for static portal delivery. Authenticated API processing, retained control data and model inference are pinned to the approved India-region architecture.

#Browser experience

The proof of concept includes a bank-branded dashboard rather than exposing LiteLLM’s administrator interface as the primary experience. The LiteLLM UI remains an optional, separately protected operator tool.

Opening the dashboard performs authenticated health, model-catalogue and summary reads only. A model is invoked only after the user submits a banking question or explicitly runs a developer scenario.

LG
Loop GatewayABC Bank · AI control plane
Illustrative demo Mumbai primary · no Global Inference
Demo Operator DO
Requests today137↑ 12% from yesterday
Estimated model spend$2.4831% of demo allowance
Policy interventions2412 PII · 8 rate · 4 region
Cache hit rate31%Approved public FAQs only
Request volume and latencyLast 60 minutes
p95 2.7s
Control postureCurrent deployed policy
  • Regional model lockDirect ap-south-1 IDs only
  • Mandatory GuardrailVersion 1 · synchronous
  • Internet egressNo NAT or public task route
Recent policy decisionsMetadata only · no prompt content
RequestIdentityAliasDecisionLatencyCost
req-1034customer-appbank-standardAllowed2.1 s$0.004
req-1035developer-aprohibited-globalRegion denied42 ms$0.000
req-1036employee-appbank-fastPII masked1.4 s$0.001
What documents are required to open a savings account?
Identity ✓Region ✓Budget ✓Guardrail ✓
You will generally need proof of identity, proof of address and recent photographs. Requirements vary by account type, so confirm them with the bank before applying.
Request req-1034 · bank-standard · ap-south-1 · 2.1 seconds
req-1035Regional policy refusalProvider was not called
req-1034Successful inferencebank-standard · $0.004
Decision evidenceImmutable request identifier
Denied
Identity
developer-a
Requested alias
prohibited-global
Policy result
CROSS_REGION_INFERENCE_NOT_PERMITTED
Provider called
No
Model cost
$0.000
Prompt retained
No

Production separation

Business dashboard

Cognito-authenticated experience for chat, spend, policy decisions, model health and audit lookup.

Operator administration

A separately protected LiteLLM administration route can be added later for model definitions and machine-client keys; it is not deployed or presented as the customer application in the MVP.

#Request flow

Traffic flowWhat happens to one end-user request
Fail closed before inference
Figure 2: Authentication, admission, direct regional inference, settlement and evidence.

OpenAI-compatible Responses request

{
  "model": "bank-standard",
  "input": [
    {
      "role": "user",
      "content": [
        {
          "type": "input_text",
          "text": "What documents are required for a savings account?"
        }
      ]
    }
  ],
  "max_output_tokens": 500,
  "store": false,
  "stream": false
}

Admission sequence

01

Authenticate

API Gateway validates the Cognito token and passes trusted identity headers; the gateway resolves the application, team and user.

401
02

Validate request

Check the stateless Responses schema, body size, allowed capabilities, store=false and explicit maximum output tokens.

400
03

Resolve model policy

Map the bank alias to a direct regional model; reject raw model IDs and inference profiles.

403
04

Apply pre-inference controls

Evaluate deterministic identifiers, Guardrail policy, rate limits and budget reservation.

422 / 429
05

Invoke and screen

Translate the accepted request to the approved Bedrock Converse path or explicit SageMaker route, synchronously inspect output and calculate actual usage.

502 / 503
06

Settle and evidence

Settle the reservation, commit the final decision and return the response with its request ID.

200
Initial response mode

The first build uses non-streaming responses. This allows final output screening, cost settlement and evidence persistence before the response is released. Synchronous streaming can be evaluated later as a measured trade-off.

Stateless Responses profile

The public contract does not enable provider-side conversation state, background execution, previous_response_id or unapproved server-side tools. This keeps the newer Responses shape without allowing provider-managed state to bypass the bank’s retention and tool policies.

#Model routing and failover

Applications request bank aliases rather than provider model identifiers. The catalogue is intentionally unresolved until account discovery confirms directly invocable models, quotas and terms in Mumbai. SageMaker appears only as an optional bank-hosted route; it is not an automatic substitute for a Bedrock model.

Routing policyBank aliases resolve only to approved direct regional models
No inference profiles
Figure 3: Logical aliases, same-region Bedrock fallback and an explicit optional SageMaker lane.
AliasPurposeDirect destinationFallback ruleStatus
bank-standardGeneral customer and employee informationApproved direct primary model in ap-south-1Approved direct backup in the same Region for retryable failuresAccount discovery
bank-fastLower-latency, lower-cost demonstrationsApproved direct fast model in ap-south-1Fail closedAccount discovery
bank-self-hostedApproved self-hosted or fine-tuned modelNamed SageMaker real-time endpoint in ap-south-1No automatic fallbackOptional phase
Failover scenarioControlled demonstration using bank-standardSimulated retryable primary failureConfigured direct regional backupDemo metadata

Routing decision order

  1. Validate the identity and team.
  2. Confirm the alias is allowed for that identity.
  3. Confirm that every candidate is a direct ap-south-1 Bedrock model resource or the specifically approved SageMaker endpoint.
  4. Apply token, budget, rate and concurrency limits.
  5. Select a healthy primary candidate.
  6. Use an equivalent same-region fallback only for retryable failures before response delivery.
  7. Fail closed if no approved equivalent exists.
Hyderabad is disaster recovery, not ordinary model routing

A direct ap-south-2 model is used only after traffic moves to a separately deployed Hyderabad recovery stack. The Mumbai runtime has no NAT path that silently calls another Region, and no geographic or Global Inference profile is permitted.

#AWS services in this guidance

AWS serviceRolePurpose in this design
Amazon Route 53NetworkingMaps the portal hostname to CloudFront and the API hostname to the Regional API custom domain.
Amazon CloudFrontBrowser entryDelivers static dashboard assets only from private S3 through Origin Access Control.
AWS WAFSecurityUses separate CloudFront-scope and Regional web ACLs for the static portal and REST API.
Amazon CognitoIdentityProvides administrator-created browser users, groups, required TOTP MFA and short-lived tokens.
Amazon API GatewayAPI boundaryA Regional REST API performs request validation, uses a Cognito user-pool authorizer and privately integrates with the ALB through VPC Link V2.
Amazon VPCNetworkingHosts a two-AZ private runtime with no NAT Gateway or public task route.
Application Load BalancerRuntimeDistributes private HTTPS traffic across Fargate tasks.
Amazon ECS on AWS FargateRuntimeRuns the banking middleware and LiteLLM without managing servers.
Amazon ECRBuildStores pinned and scanned container images.
AWS CodeBuildBuildBuilds containers in AWS so Docker is not required on the local laptop.
Amazon BedrockInferenceProvides approved directly invocable foundation models in ap-south-1.
Amazon SageMaker AIOptional inferenceHosts an explicitly approved bank-managed model behind a named real-time endpoint and PrivateLink route.
Amazon RDS for PostgreSQLControl stateStores teams, authoritative budget reservations, request evidence, usage and the archive outbox.
Amazon ElastiCacheFast stateProvides distributed rate and concurrency counters plus eligible response caching.
Amazon S3EvidenceStores encrypted, versioned evidence with Object Lock retention and no raw prompt content.
Amazon CloudWatchOperationsReceives content-free logs, metrics, dashboards and alarms.
AWS KMSEncryptionProvides customer-managed encryption for data, evidence and logs.
AWS Secrets ManagerSecretsStores generated gateway secrets and non-human credentials.
Amazon InspectorOptional account controlCan add enhanced continuous ECR scanning; the stack enables immutable tags and ECR scan-on-push by default.
AWS CloudTrailAccount baselineThe bank’s existing organization or account trail should record infrastructure and policy-management API activity; this stack does not create a new trail.

Runtime VPC endpoints

The final endpoint list is derived from real runtime calls rather than copied from the original guidance. The implemented set is Bedrock Runtime, ECR API, ECR Docker, CloudWatch Logs and Secrets Manager interface endpoints, plus an S3 gateway endpoint. Metrics use Embedded Metric Format through CloudWatch Logs. SageMaker Runtime is added only if the optional hosted-model route is enabled.

#Plan your deployment

Selected deployment profile

ABrowser-accessible portal with a private inference runtime

Route 53 → CloudFront/WAF static portal → Cognito-authenticated dashboard → separate Regional API Gateway/WAF → VPC Link V2 → internal ALB → private Fargate. The public entry accepts authenticated inbound traffic; it does not provide internet egress to the model runtime.

Differences from the published AWS guidance

AreaPublished guidanceIndian-bank designReason
Provider scopeBroad multi-provider accessApproved Bedrock models plus an optional named SageMaker endpointRemoves arbitrary provider internet egress from the PoC.
Regional routingRegional and provider fallbacks are configurableMumbai direct IDs in Phase 1; a separate Hyderabad cold stack in Phase 2Prevents hidden cross-region or Global Inference.
API contractOpenAI-compatible endpointsStateless /v1/responses primary; Chat Completions compatibilityUses the current API shape while preserving bank-owned state and Guardrail controls.
RuntimeAmazon ECS or Amazon EKSAmazon ECS on AWS FargateAvoids unnecessary Kubernetes operations.
Browser experienceLiteLLM administration and testing UIBank dashboard plus private operator UIDemonstrates business controls rather than proxy configuration.
IdentityLiteLLM keys and optional external OAuthCognito browser identity in the MVP; machine credentials are a later extensionEstablishes the human-login path without exposing the LiteLLM control plane.
Policy authorityPrimarily LiteLLM configurationBank middleware, LiteLLM, IAM and endpoint controlsA configuration error cannot be the only security boundary.
PersistenceRDS and RedisRDS and Redis retained with a bank evidence schemaReuses the proven baseline while adding durable decisions.
LoggingOperational logs and callbacksMetadata-only evidence; prompt bodies disabledReduces sensitive-data retention risk.
CachingGeneral prompt/response cachingOff by default; approved FAQ use onlyPrevents cross-user or stale banking responses.
Container buildImages built during deploymentCodeBuild performs all Docker workNo local Docker installation is required.

Prerequisites

  • Architecture boundary agreed

    Mumbai direct inference for the MVP; no global or geographic inference profiles. Hyderabad remains an explicit cold-DR phase.

  • Local Docker not required

    AWS CodeBuild will build and push the runtime image.

  • !
    Target account and deployment role

    Confirm the AWS account, profile and least-privilege deployment permissions.

  • !
    Direct regional model catalogue

    List directly invocable models, terms and quotas in ap-south-1.

  • !
    Domain and certificate

    Verify ownership and certificates for aigateway.ajitsury.people.aws.dev and api.aigateway.ajitsury.people.aws.dev.

  • !
    Bank policy decisions

    Confirm PII actions, budget dimensions, evidence retention and administrator roles.

#Security

Security is implemented as independent layers. No single Guardrail, network route, LiteLLM setting or dashboard permission is treated as sufficient by itself.

Identity

  • Short-lived Cognito tokens
  • Administrator-created pilot users
  • Required TOTP MFA
  • No model credentials in the browser

Network

  • Private S3 origin with CloudFront OAC
  • Internal ALB and private Fargate
  • No public task IP or Lambda function URL
  • No NAT or general internet route

Data

  • KMS encryption for state and evidence
  • HTTPS to the internal ALB
  • No raw prompts in operational logs
  • Explicit retention controls

Models

  • Direct regional ARN allowlist
  • Inference profiles denied
  • Mandatory Guardrail version
  • Emergency alias suspension

Guardrail strategy

ModeUse in this designDecision
ApplyGuardrailStandalone input screening before model invocation and optional final output screening.Required for the stateless Responses profile
guardrailConfigPinned input and output evaluation when LiteLLM invokes the Bedrock Converse path.Primary Bedrock model-call mode
guardContentSelective marking of all untrusted content in future RAG and tool workflows.Future capability
PII and logging boundary

Masking the API response does not automatically sanitize every diagnostic field. Guardrail trace is disabled in production, model invocation-body logging remains off for sensitive workloads, Regional WAF request sampling is disabled, and evidence records contain decisions rather than matched values.

Public-access prevention carried forward

This design creates no Lambda function URL. The portal bucket keeps all S3 Public Access Block settings enabled, and its policy grants only cloudfront.amazonaws.com with the specific distribution AWS:SourceArn. Deployment stops on AuthType: NONE, wildcard principals or wildcard AWS principals in resource policies.

#Banking governance

The gateway provides technical controls and evidence for the bank’s governance process. It is not presented as a compliance certificate and cannot replace model ownership, legal review, independent validation, risk acceptance or customer-remediation processes.

Governance needGateway supportBank responsibility
Model inventoryAlias, direct destination, owner, intended use, policy version and status.Approve the inventory and define model-risk tiers.
Change controlVersioned configuration, deployment history and emergency suspension.Define approvers and material-change thresholds.
Ongoing monitoringLatency, errors, usage, refusals, fallback and control-intervention metrics.Set review frequency and escalation thresholds.
Third-party modelsExact provider/model identity and per-request evidence.Perform due diligence, contract and model-term review.
Human oversightDisclosure, handoff route and model suspension controls.Staff the process and review interventions.
Customer protectionNo autonomous financial decision or transaction path in the PoC.Define grievance, correction and remediation processes.

#Cost controls

Model spending and infrastructure spending are controlled separately. The bank middleware and PostgreSQL enforce authoritative application budgets; LiteLLM supplies usage data and Redis enforces short-lived rate and concurrency limits. CloudWatch monitors runtime behavior; an AWS Budget can be added after the bank supplies its notification recipients and approved threshold. No monthly total is stated until traffic, token, retention, endpoint and availability assumptions are agreed.

Application budgetFail closed

Reserve worst-case request cost before inference and settle actual usage afterward.

Unknown pricingNever zero

An unpriced model or alias is unavailable until its rate is configured and approved.

Token controlExplicit maximum

Every request supplies a bounded maximum output to control both cost and Bedrock quota reservation.

InfrastructureMeasured separately

ALB, Fargate, RDS, Redis and VPC endpoints can dominate a low-traffic demo.

Cost-control sequence

  1. Estimate input tokens and apply the explicit maximum output.
  2. Calculate worst-case cost from the versioned approved-model price map.
  3. Atomically reserve that amount in a PostgreSQL transaction.
  4. Invoke only when the reservation succeeds.
  5. Settle actual usage and release the unused reservation.
  6. Persist zero-cost refusals and cache hits as evidence.

#Deploy the guidance

AWS CDK defines the infrastructure and runs strict synthesis with AWS Solutions validation. CodeBuild tests, builds and pushes the policy-gateway image so that the local machine does not require Docker. ECR scan-on-push is enabled; the bank can enable Amazon Inspector enhanced scanning as an account-level control.

1

Read-only discovery

Verify account identity, VPC, quotas, direct regional models, domain, certificates and policy constraints.

2

Foundation

Create networking, VPC endpoints, KMS keys, RDS, Redis, Object Lock-enabled S3, Secrets Manager and ECR.

3

Remote build

Use CodeBuild to test the middleware, build the pinned container and publish it to ECR.

4

Private runtime

Deploy ECS, Fargate tasks, internal ALB, LiteLLM configuration and the evidence worker.

5

Browser entry

Deploy private S3/OAC hosting, CloudFront WAF, Cognito, Regional REST API WAF, VPC Link V2, certificates and DNS.

6

Configuration

Seed aliases, demo users, Guardrail version, budgets, rate limits and synthetic scenarios.

7

Verification

Run functional, security, regional, evidence, cost and failure-injection acceptance tests.

Acceptance criteria

  • The custom HTTPS URL loads and redirects to Cognito before dashboard data or inference is accessible.
  • The S3 portal origin is private, uses OAC with SigningBehavior=always, and has no wildcard resource-policy principal.
  • No Lambda function URL or AuthType: NONE resource is created.
  • The ALB and Fargate tasks are private and have no general internet route.
  • Unauthenticated inference returns 401 and disallowed aliases return 403.
  • Global, geographic and arbitrary model IDs are rejected before provider invocation.
  • Synthetic PII is blocked or masked without appearing in operational evidence.
  • Rate, budget, cache, same-region failover and optional SageMaker-route scenarios create matching evidence.
  • Every successful model call records the resolved direct model and ap-south-1.
  • CloudWatch receives gateway, token, cost, policy, cache and failover metrics; alarms cover API 5xx responses and unhealthy private targets.

#Demonstration script

The demo starts with the business experience and then reveals the architecture and controls. All prompts, identities and identifiers are synthetic.

00:00

Open the portal

Load the custom URL, sign in and show the single-region and control-posture indicators.

00:45

Normal request

Ask a general savings-account question using bank-standard and open its request evidence.

01:45

Sensitive-data control

Enter a synthetic card or PAN-like value and show the block or masking decision.

02:45

Regional enforcement

Request a prohibited global alias and show provider_called=false with zero model cost.

03:45

Budget and rate limits

Exhaust a small demo budget and RPM limit, then show the different refusal reasons.

05:00

Alias routing

Switch between bank-standard and bank-fast and show the resolved direct route, token limit and expected cost.

06:00

Model failover

Run the deterministic failover scenario and show the configured direct Mumbai backup plus its persisted evidence; explain that live retryable fallback is configured separately and Hyderabad DR is a separate stack.

07:00

Safe cache

Repeat an approved public FAQ and show a cache hit with no second model charge.

08:00

Operations and evidence

Close on latency, spend, interventions, audit lookup and known limitations.

#Known limitations

Not a compliance certificate

The gateway provides controls and evidence; it does not replace governance, legal review, validation or audit.

Direct model availability is an account gate

The final alias catalogue depends on directly invocable models and quotas in the target account.

No regional-outage fallback in Phase 1

The Mumbai MVP is unavailable during a complete regional outage until the separate Hyderabad cold stack is deployed and tested.

Responses is intentionally stateless

Provider-managed conversations, background execution and server-side tools are disabled in the initial bank profile.

SageMaker is conditional

The hosted-model lane is deployed only after the model image, endpoint sizing, security controls and output equivalence are approved.

Guardrails are probabilistic

Managed detection can produce false positives and false negatives and must be supplemented and tested.

Model and task load balancing are conditional

The cost-controlled demo runs one gateway task and does not claim duplicate model deployments. The resilience profile adds a second task; model balancing requires approved equivalent destinations.

Budgets depend on correct pricing

Unknown prices fail closed, and reservation behavior must be concurrency-tested.

Demo prices are not a bank tariff

The initial price map is synthetic. Verified account model prices and an approved currency-conversion policy are required before financial reporting.

Browser identity context is intentionally narrow

Cognito groups are propagated, but the MVP maps browser users to one pilot team and application. Enterprise workforce federation and machine-client credentials are later phases.

Evidence is effectively once

Idempotent request IDs and an outbox reduce duplicates; literal exactly-once delivery is not claimed.

Caching is narrowly permitted

Only approved non-personalized content can be cached; PII and user-specific output bypass the cache.

Streaming is deferred

The initial build favors complete screening and settlement over early token delivery.

Private architecture has a baseline cost

RDS, Redis, ALB and interface endpoints may cost more than model tokens at PoC volume.

#Resilience and recovery

AvailabilityOptional Multi-AZ resilience profile inside Mumbai
No cross-region inference
Figure 4: Availability Zone resilience in Mumbai, with Hyderabad retained as a separate cold-recovery phase.

The VPC and ALB span two Availability Zones. The default demo profile deliberately uses one Fargate task, one PostgreSQL instance and one Valkey node to reduce baseline cost. Setting productionResilience=true enables two tasks, Multi-AZ PostgreSQL and a Valkey replica with Multi-AZ failover. A full regional outage remains an accepted limitation until the bank approves and tests a separate India-region recovery design.

LayerPhase 1: MumbaiPhase 2: Hyderabad cold recovery
ApplicationTwo-AZ ALB; one demo task or two resilience-profile tasksSame CDK architecture deployed into ap-south-2 at recovery capacity
Control stateSingle-node demo state or Multi-AZ PostgreSQL and Valkey when resilience is enabledEncrypted RDS cross-Region replica or approved snapshot recovery; Valkey rebuilt from authoritative state
Artifacts and evidenceECR and Object Lock-enabled S3Replicated image and evidence configuration using Hyderabad KMS keys
TrafficRegional API custom domain serves normal trafficRoute 53 recovery procedure promotes the Hyderabad API after health and data checks
InferenceDirect ap-south-1 model IDsSeparately verified direct ap-south-2 model IDs; never an inference profile
Recovery is not yet automatic

RTO, RPO, model equivalence, Cognito recovery, key access, database promotion and DNS failover must be tested before the Hyderabad path can be described as operational DR.

#Verification sources

The design uses primary AWS and LiteLLM documentation. Model availability, quotas, account entitlements, exact service endpoint requirements and commercial LiteLLM features must be verified again during account discovery.

Architecture areaVerification resultCurrent status
REST API to internal ALBRegional REST API, VPC Link V2, private DNS and internal ALB are synthesized and tested.Locally validated
Browser authorizationREST methods use a Cognito user-pool authorizer; administrator-created users complete Authorization Code with PKCE and required MFA.Locally validated
Static portal originPrivate S3 bucket with CloudFront OAC, signed requests and distribution-scoped bucket policy is synthesized and security-checked.Locally validated
Responses APIThe stateless contract is application-tested and translated to the controlled LiteLLM/Bedrock Converse path with pinned Guardrail configuration.Locally validated profile
Inference geographyConfiguration, IAM and synth validation accept only direct Mumbai model IDs and reject Global, geographic and profile identifiers.Locally validated policy
Hyderabad recoveryArchitecturally feasible only as a separately deployed and tested regional stack.Phase 2
SageMaker routePrivate invocation is feasible through a SageMaker Runtime VPC endpoint.Optional phase
Audit durabilityApplication-tested PostgreSQL outbox plus synthesized S3 Versioning and Object Lock; no exactly-once claim.Locally validated
Account-specific modelsExact model IDs, quotas and entitlements require live discovery in both India Regions.Credentials required

#Uninstall the guidance

Teardown is performed only after explicit approval and follows dependency order:

  1. Disable new user access and inference traffic.
  2. Export required evidence and confirm retention obligations.
  3. Remove DNS, CloudFront/OAC, API custom-domain and Cognito integration.
  4. Delete the API, VPC Link, ALB and Fargate runtime.
  5. Remove RDS, Redis and endpoints after approved backups are complete.
  6. Empty retained build and evidence buckets only after separate confirmation; Object Lock retention can prevent deletion until the approved date.
  7. Delete KMS keys according to the approved waiting period and verify that no chargeable resource remains.

#Notices

  • This page describes a synthetic-data proof of concept, not a production banking system.
  • Product availability, quotas, model terms, licensing and pricing require account-level verification.
  • Open-source dependencies require vulnerability, licence and version review before deployment.
  • Third-party foundation models remain subject to provider terms and bank approval.
  • No real customer, employee, credential or confidential bank data may be entered into the PoC.

Architecture prototype prepared for solution review. The linked AWS guidance retains its own copyright and licence terms.

Last reviewed: September 21, 2026