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.
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
One governed API
Applications use a stable request format and bank-owned model aliases.
Region is enforced
Direct India-region destinations are explicit; global and geographic inference profiles are denied.
Deny before inference
Identity, model, sensitive-data, rate and budget checks precede the provider call.
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.
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.
| # | LiteLLM capability | Bank implementation | Browser-demo evidence | Status |
|---|---|---|---|---|
| 1 | Unified API | /v1/responses is the primary stateless contract; /v1/chat/completions remains a compatibility route. | One request works with multiple approved aliases. | Restricted |
| 2 | Model routing | The 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 |
| 3 | Failover | MVP 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 |
| 4 | Load balancing | The 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 |
| 5 | Authentication | Cognito 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 |
| 6 | Security controls | WAF, deterministic Indian identifier patterns and mandatory Bedrock Guardrails. | Synthetic PII is blocked or masked. | Included |
| 7 | Rate limits | Redis-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 |
| 8 | Cost controls | Pre-call reservation, explicit price map and post-call settlement. | An exhausted budget is refused before inference. | Included |
| 9 | Logging and audit | Metadata-only evidence in PostgreSQL with encrypted, Object Lock-enabled S3 archival. | Selecting the request ID retrieves its persisted content-free decision record. | Included |
| 10 | Caching | Tenant-aware Redis cache for approved, non-personalized FAQs only. | The second safe request is a visible cache hit. | Included |
| 11 | Observability | CloudWatch 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 |
| 12 | Policy enforcement | Model 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
| Area | LiteLLM contribution | Bank-owned extension |
|---|---|---|
| API normalization | OpenAI-compatible Responses and Chat Completions endpoints, provider adapters and normalized errors. | A stateless Responses subset, controlled aliases and application-specific metadata. |
| Routing | Retries, cooldowns, fallbacks and model groups. | Direct-region allowlist, business priority, intended-use rules and fail-closed outcomes. |
| Identity | LiteLLM 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 controls | Spend tracking and RPM/TPM limits. | PostgreSQL-authoritative cost reservation, unknown-price rejection and request evidence. |
| Safety | Guardrail integrations and callbacks. | IAM-enforced Guardrail, Indian identifier patterns and content-free telemetry. |
| Governance | Operational 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
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
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
The dashboard sends
POST /v1/responsesto the separate Regional API hostname using the short-lived Cognito token. - 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
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
The banking middleware resolves identity and model alias, checks regional policy, applies deterministic screening, reserves budget and evaluates rate limits.
- 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-hostedSageMaker route when that optional endpoint is enabled. - 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
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
Metadata-only evidence is archived to an encrypted, versioned, Object Lock-enabled S3 bucket while CloudWatch receives operational metrics and content-free logs.
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.
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.
- ✓Regional model lockDirect ap-south-1 IDs only
- ✓Mandatory GuardrailVersion 1 · synchronous
- ✓Internet egressNo NAT or public task route
| Request | Identity | Alias | Decision | Latency | Cost |
|---|---|---|---|---|---|
req-1034 | customer-app | bank-standard | Allowed | 2.1 s | $0.004 |
req-1035 | developer-a | prohibited-global | Region denied | 42 ms | $0.000 |
req-1036 | employee-app | bank-fast | PII masked | 1.4 s | $0.001 |
req-1034 · bank-standard · ap-south-1 · 2.1 seconds
req-1035Regional policy refusalProvider was not calledreq-1034Successful inferencebank-standard · $0.004- 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
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
Authenticate
API Gateway validates the Cognito token and passes trusted identity headers; the gateway resolves the application, team and user.
Validate request
Check the stateless Responses schema, body size, allowed capabilities, store=false and explicit maximum output tokens.
Resolve model policy
Map the bank alias to a direct regional model; reject raw model IDs and inference profiles.
Apply pre-inference controls
Evaluate deterministic identifiers, Guardrail policy, rate limits and budget reservation.
Invoke and screen
Translate the accepted request to the approved Bedrock Converse path or explicit SageMaker route, synchronously inspect output and calculate actual usage.
Settle and evidence
Settle the reservation, commit the final decision and return the response with its request ID.
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.
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.
| Alias | Purpose | Direct destination | Fallback rule | Status |
|---|---|---|---|---|
bank-standard | General customer and employee information | Approved direct primary model in ap-south-1 | Approved direct backup in the same Region for retryable failures | Account discovery |
bank-fast | Lower-latency, lower-cost demonstrations | Approved direct fast model in ap-south-1 | Fail closed | Account discovery |
bank-self-hosted | Approved self-hosted or fine-tuned model | Named SageMaker real-time endpoint in ap-south-1 | No automatic fallback | Optional phase |
| Failover scenario | Controlled demonstration using bank-standard | Simulated retryable primary failure | Configured direct regional backup | Demo metadata |
Routing decision order
- Validate the identity and team.
- Confirm the alias is allowed for that identity.
- Confirm that every candidate is a direct
ap-south-1Bedrock model resource or the specifically approved SageMaker endpoint. - Apply token, budget, rate and concurrency limits.
- Select a healthy primary candidate.
- Use an equivalent same-region fallback only for retryable failures before response delivery.
- Fail closed if no approved equivalent exists.
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 service | Role | Purpose in this design |
|---|---|---|
| Amazon Route 53 | Networking | Maps the portal hostname to CloudFront and the API hostname to the Regional API custom domain. |
| Amazon CloudFront | Browser entry | Delivers static dashboard assets only from private S3 through Origin Access Control. |
| AWS WAF | Security | Uses separate CloudFront-scope and Regional web ACLs for the static portal and REST API. |
| Amazon Cognito | Identity | Provides administrator-created browser users, groups, required TOTP MFA and short-lived tokens. |
| Amazon API Gateway | API boundary | A Regional REST API performs request validation, uses a Cognito user-pool authorizer and privately integrates with the ALB through VPC Link V2. |
| Amazon VPC | Networking | Hosts a two-AZ private runtime with no NAT Gateway or public task route. |
| Application Load Balancer | Runtime | Distributes private HTTPS traffic across Fargate tasks. |
| Amazon ECS on AWS Fargate | Runtime | Runs the banking middleware and LiteLLM without managing servers. |
| Amazon ECR | Build | Stores pinned and scanned container images. |
| AWS CodeBuild | Build | Builds containers in AWS so Docker is not required on the local laptop. |
| Amazon Bedrock | Inference | Provides approved directly invocable foundation models in ap-south-1. |
| Amazon SageMaker AI | Optional inference | Hosts an explicitly approved bank-managed model behind a named real-time endpoint and PrivateLink route. |
| Amazon RDS for PostgreSQL | Control state | Stores teams, authoritative budget reservations, request evidence, usage and the archive outbox. |
| Amazon ElastiCache | Fast state | Provides distributed rate and concurrency counters plus eligible response caching. |
| Amazon S3 | Evidence | Stores encrypted, versioned evidence with Object Lock retention and no raw prompt content. |
| Amazon CloudWatch | Operations | Receives content-free logs, metrics, dashboards and alarms. |
| AWS KMS | Encryption | Provides customer-managed encryption for data, evidence and logs. |
| AWS Secrets Manager | Secrets | Stores generated gateway secrets and non-human credentials. |
| Amazon Inspector | Optional account control | Can add enhanced continuous ECR scanning; the stack enables immutable tags and ECR scan-on-push by default. |
| AWS CloudTrail | Account baseline | The 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
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
| Area | Published guidance | Indian-bank design | Reason |
|---|---|---|---|
| Provider scope | Broad multi-provider access | Approved Bedrock models plus an optional named SageMaker endpoint | Removes arbitrary provider internet egress from the PoC. |
| Regional routing | Regional and provider fallbacks are configurable | Mumbai direct IDs in Phase 1; a separate Hyderabad cold stack in Phase 2 | Prevents hidden cross-region or Global Inference. |
| API contract | OpenAI-compatible endpoints | Stateless /v1/responses primary; Chat Completions compatibility | Uses the current API shape while preserving bank-owned state and Guardrail controls. |
| Runtime | Amazon ECS or Amazon EKS | Amazon ECS on AWS Fargate | Avoids unnecessary Kubernetes operations. |
| Browser experience | LiteLLM administration and testing UI | Bank dashboard plus private operator UI | Demonstrates business controls rather than proxy configuration. |
| Identity | LiteLLM keys and optional external OAuth | Cognito browser identity in the MVP; machine credentials are a later extension | Establishes the human-login path without exposing the LiteLLM control plane. |
| Policy authority | Primarily LiteLLM configuration | Bank middleware, LiteLLM, IAM and endpoint controls | A configuration error cannot be the only security boundary. |
| Persistence | RDS and Redis | RDS and Redis retained with a bank evidence schema | Reuses the proven baseline while adding durable decisions. |
| Logging | Operational logs and callbacks | Metadata-only evidence; prompt bodies disabled | Reduces sensitive-data retention risk. |
| Caching | General prompt/response caching | Off by default; approved FAQ use only | Prevents cross-user or stale banking responses. |
| Container build | Images built during deployment | CodeBuild performs all Docker work | No 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.devandapi.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
| Mode | Use in this design | Decision |
|---|---|---|
ApplyGuardrail | Standalone input screening before model invocation and optional final output screening. | Required for the stateless Responses profile |
guardrailConfig | Pinned input and output evaluation when LiteLLM invokes the Bedrock Converse path. | Primary Bedrock model-call mode |
guardContent | Selective marking of all untrusted content in future RAG and tool workflows. | Future capability |
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.
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 need | Gateway support | Bank responsibility |
|---|---|---|
| Model inventory | Alias, direct destination, owner, intended use, policy version and status. | Approve the inventory and define model-risk tiers. |
| Change control | Versioned configuration, deployment history and emergency suspension. | Define approvers and material-change thresholds. |
| Ongoing monitoring | Latency, errors, usage, refusals, fallback and control-intervention metrics. | Set review frequency and escalation thresholds. |
| Third-party models | Exact provider/model identity and per-request evidence. | Perform due diligence, contract and model-term review. |
| Human oversight | Disclosure, handoff route and model suspension controls. | Staff the process and review interventions. |
| Customer protection | No 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.
Reserve worst-case request cost before inference and settle actual usage afterward.
An unpriced model or alias is unavailable until its rate is configured and approved.
Every request supplies a bounded maximum output to control both cost and Bedrock quota reservation.
ALB, Fargate, RDS, Redis and VPC endpoints can dominate a low-traffic demo.
Cost-control sequence
- Estimate input tokens and apply the explicit maximum output.
- Calculate worst-case cost from the versioned approved-model price map.
- Atomically reserve that amount in a PostgreSQL transaction.
- Invoke only when the reservation succeeds.
- Settle actual usage and release the unused reservation.
- 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.
Read-only discovery
Verify account identity, VPC, quotas, direct regional models, domain, certificates and policy constraints.
Foundation
Create networking, VPC endpoints, KMS keys, RDS, Redis, Object Lock-enabled S3, Secrets Manager and ECR.
Remote build
Use CodeBuild to test the middleware, build the pinned container and publish it to ECR.
Private runtime
Deploy ECS, Fargate tasks, internal ALB, LiteLLM configuration and the evidence worker.
Browser entry
Deploy private S3/OAC hosting, CloudFront WAF, Cognito, Regional REST API WAF, VPC Link V2, certificates and DNS.
Configuration
Seed aliases, demo users, Guardrail version, budgets, rate limits and synthetic scenarios.
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: NONEresource 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.
Open the portal
Load the custom URL, sign in and show the single-region and control-posture indicators.
Normal request
Ask a general savings-account question using bank-standard and open its request evidence.
Sensitive-data control
Enter a synthetic card or PAN-like value and show the block or masking decision.
Regional enforcement
Request a prohibited global alias and show provider_called=false with zero model cost.
Budget and rate limits
Exhaust a small demo budget and RPM limit, then show the different refusal reasons.
Alias routing
Switch between bank-standard and bank-fast and show the resolved direct route, token limit and expected cost.
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.
Safe cache
Repeat an approved public FAQ and show a cache hit with no second model charge.
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
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.
| Layer | Phase 1: Mumbai | Phase 2: Hyderabad cold recovery |
|---|---|---|
| Application | Two-AZ ALB; one demo task or two resilience-profile tasks | Same CDK architecture deployed into ap-south-2 at recovery capacity |
| Control state | Single-node demo state or Multi-AZ PostgreSQL and Valkey when resilience is enabled | Encrypted RDS cross-Region replica or approved snapshot recovery; Valkey rebuilt from authoritative state |
| Artifacts and evidence | ECR and Object Lock-enabled S3 | Replicated image and evidence configuration using Hyderabad KMS keys |
| Traffic | Regional API custom domain serves normal traffic | Route 53 recovery procedure promotes the Hyderabad API after health and data checks |
| Inference | Direct ap-south-1 model IDs | Separately verified direct ap-south-2 model IDs; never an inference profile |
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 area | Verification result | Current status |
|---|---|---|
| REST API to internal ALB | Regional REST API, VPC Link V2, private DNS and internal ALB are synthesized and tested. | Locally validated |
| Browser authorization | REST methods use a Cognito user-pool authorizer; administrator-created users complete Authorization Code with PKCE and required MFA. | Locally validated |
| Static portal origin | Private S3 bucket with CloudFront OAC, signed requests and distribution-scoped bucket policy is synthesized and security-checked. | Locally validated |
| Responses API | The stateless contract is application-tested and translated to the controlled LiteLLM/Bedrock Converse path with pinned Guardrail configuration. | Locally validated profile |
| Inference geography | Configuration, IAM and synth validation accept only direct Mumbai model IDs and reject Global, geographic and profile identifiers. | Locally validated policy |
| Hyderabad recovery | Architecturally feasible only as a separately deployed and tested regional stack. | Phase 2 |
| SageMaker route | Private invocation is feasible through a SageMaker Runtime VPC endpoint. | Optional phase |
| Audit durability | Application-tested PostgreSQL outbox plus synthesized S3 Versioning and Object Lock; no exactly-once claim. | Locally validated |
| Account-specific models | Exact model IDs, quotas and entitlements require live discovery in both India Regions. | Credentials required |
- AWS Solutions Library: Guidance for Multi-Provider Generative AI Gateway on AWS
- AWS Solutions Library sample implementation repository
- Amazon Bedrock: Supported foundation models
- Amazon Bedrock: Supported inference APIs and Responses API limitations
- Amazon Bedrock: Inference profile support and destinations
- Amazon Bedrock: Enforce Guardrails with IAM
- Amazon API Gateway: Private integrations and VPC links
- Amazon API Gateway: Cognito user-pool authorizer for REST APIs
- Amazon CloudFront: Restrict S3 origin access with OAC
- Amazon SageMaker AI: Private API and Runtime access through PrivateLink
- Amazon RDS: Cross-Region read replicas
- Amazon S3: Object Lock retention
- AWS CodeBuild: Build and push Docker images
- Amazon Inspector: Enhanced ECR image scanning
- LiteLLM Proxy Server documentation
- LiteLLM retries and fallback documentation
- LiteLLM caching documentation
#Uninstall the guidance
Teardown is performed only after explicit approval and follows dependency order:
- Disable new user access and inference traffic.
- Export required evidence and confirm retention obligations.
- Remove DNS, CloudFront/OAC, API custom-domain and Cognito integration.
- Delete the API, VPC Link, ALB and Fargate runtime.
- Remove RDS, Redis and endpoints after approved backups are complete.
- Empty retained build and evidence buckets only after separate confirmation; Object Lock retention can prevent deletion until the approved date.
- 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