
Personalized Financial Assistant on a Sandbox on Amazon EKS
Authored by Elamaran Shanmugam - Sr. Specialist Containers SA and Pankaj Walke - Sr. Open Source Engineer.
Introduction
Financial services institutions have spent a decade building personalization engines. Most of them are rule-based: bucket a client into a tier, look up the matching content, render it. That approach retrieves the same answer for everyone in a bucket but a client's question is rarely about a bucket. “If I move $2,000 a month into a taxed brokerage account for eight years, what does that do to my retirement timeline, and is tax-loss harvesting worth it at my bracket?” cannot be answered by retrieval. It has to be computed, per client, from that client's own numbers.
That is the shift this post is about: from static personalization to AI-generated, per-client computation. And it introduces a hard problem. When a large language model (LLM) generates the code that runs a Monte Carlo projection or a tax model, you cannot execute that code next to other clients' data in a shared process. In a regulated environment, untrusted, model-generated code needs a real isolation boundary.
In this post, we show you how to build a personalized financial assistant on Amazon Elastic Kubernetes Service (Amazon EKS) that runs each client's computation inside a hardware-isolated microVM. We use the open-source Agent Sandbox project from Kubernetes SIG Apps (kubernetes-sigs/agent-sandbox) for pre-warmed, per-request sandbox isolation, Kata Containers with Firecracker microVMs for the isolation boundary, Amazon Bedrock for LLM inference, and the Model Context Protocol (MCP) for standardized tool access. Everything is deployed through GitOps and is fully reproducible, a link to the sample repository is at the end of the post.
This solution is a reference architecture for building client-facing financial applications. The sample assistant is an educational and reasoning tool, not a fiduciary, broker, or tax advisor, and it does not provide investment advice. Validate any production deployment against your own regulatory, security, and compliance requirements (SEC, FINRA, OCC, and others as applicable).
Disclaimer: This solution is a reference architecture for building client-facing financial applications. The sample assistant is an educational and reasoning tool, not a fiduciary, broker, or tax advisor, and it does not provide investment advice. Validate any production deployment against your own regulatory, security, and compliance requirements (SEC, FINRA, OCC, and others as applicable).
Why financial personalization is different
Before the architecture, it is worth being precise about why this workload is unusual, because the constraints are what drive every design decision that follows.
- Dynamic computation over static retrieval. Financial personalization means computing portfolio returns, tax implications, and cash-flow forecasts from each client's own numbers. Retrieval returns a document; personalization returns a calculation. That calculation is code, and increasingly that code is written by an LLM at request time.
- Client data sensitivity. Balances, transactions, and personally identifiable information (PII) must stay scoped to a single client's execution context. A shared interpreter or a shared pod is a cross-client data-leak waiting to happen.
- Regulatory explainability. Regulators expect an auditable trail behind every recommendation, the inputs, the code that ran, and the output. Ephemeral, per-request execution with structured logging makes that trail a byproduct of the architecture rather than an afterthought.
- Real-time context sensitivity. A projection that was suitable this morning may not be after a market move. Calculations are time-sensitive and must run against fresh context, not a nightly batch.
- Multi-tenancy and isolation. Thousands of concurrent clients need isolation that is guaranteed by architecture, not by convention. Ephemeral, microVM-backed sandboxes give you a boundary the CPU enforces.
The challenges
- Static personalization limits: rule-based engines produce generic tiers, not individualized guidance.
- Unsafe code execution: LLM-generated calculations cannot run unsandboxed in a regulated environment.
- Data isolation: shared execution environments risk cross-client contamination.
- Latency vs. security: sandbox overhead must not break sub-second perceived-latency expectations.
- Auditability: every recommendation must be reproducible for compliance.
Solution overview
The architecture is a layered, Kubernetes-native design. Each layer has one job, and the boundaries between them are where the security and observability guarantees live.
- Assistant agent layer. a single financial assistant agent orchestrates the personalization workflow and reaches its tools through MCP.
- Client context layer (MCP tools). portfolio, transactions, risk preferences, and market data are exposed as standardized MCP services, so the agent calls tools instead of hard-coding data access.
- Sandbox execution layer (Agent Sandbox). AI-generated personalization code runs in isolated sandbox pods backed by Kata Containers and Firecracker microVMs. A SandboxWarmPool pre-warms pods so allocation is fast; a SandboxClaim gives each user a bound, scoped, network-restricted sandbox with a scheduled-deletion lease.
- Gateway layer ( LiteLLM ). LiteLLM provides an OpenAI-compatible endpoint in front of Amazon Bedrock, with model fallbacks, per-key budget caps, request metrics, and Bedrock Guardrails applied to every call.
- Observability layer. Prometheus and Grafana capture metrics on both sides of the sandbox boundary; the design extends cleanly to LLM tracing (for example, Langfuse ) and distributed tracing (for example, Jaeger ).
- Foundation (Amazon EKS + Amazon Bedrock). Amazon EKS runs every workload, and Amazon Bedrock provides managed model inference — no client data leaves your AWS account.

Figure 1. End-to-end platform architecture.
A few platform decisions are worth calling out because they make the sandbox story practical on EKS:
- Karpenter for workload nodes. the cluster runs a small managed system node group for the control-plane add-ons ( Argo CD , Karpenter, monitoring, LiteLLM, the router, and the UI). Everything else — including the Kata microVM nodes — is provisioned on demand by Karpenter across dedicated node pools, so sandbox capacity scales with load and to zero when idle.
- No custom AMI. nodes run the stock EKS-optimized Amazon Linux 2023 AMI. The Kata runtime (QEMU, Cloud Hypervisor , and Firecracker shims) is installed at boot by the upstream kata-deploy DaemonSet, so there is no custom AMI to bake or maintain — bumping a Kata version is a one-line chart change.
- Nested virtualization. AWS exposes Intel VT-x on 8th-generation instances (c8i/m8i) through nested virtualization, so Kata microVMs run on cost-effective on-demand and Spot instances, with bare-metal (.metal) kept only as a fallback.
Setting up Agent Sandbox on Amazon EKS
Agent Sandbox is a Kubernetes SIG Apps subproject that adds a small set of custom resources for running agent workloads in isolated, stateful pods. Three resources do the work:
- SandboxTemplate describes the pod spec once. Because every warm pod is byte-identical, the controller can pre-bind one without a cold start.
- SandboxWarmPool keeps a buffer of pre-warmed pods ready to bind.
- SandboxClaim is created per request (here, per user). The controller binds it to a warm pod when one is available, or cold-creates one when the pool is empty. The claim also carries the lifecycle lease that tears the sandbox down when it goes idle.
Install the controller and CRDs through Argo CD. In this sample it is an app-of-apps entry that syncs in an early wave, before any workload that needs a sandbox:
# gitops/apps/agent-sandbox.yaml (Argo CD Application, sync wave -1) apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: agent-sandbox namespace: argocd annotations: argocd.argoproj.io/sync-wave: "-1" spec: project: default source: repoURL: https://github.com/elamaran11/eks-platform-openclaw path: gitops/helm/agent-sandbox # controller + CRDs, appVersion v0.5.0 targetRevision: main destination: server: https://kubernetes.default.svc namespace: agent-sandbox-system syncPolicy: automated: { prune: true, selfHeal: true } syncOptions: [CreateNamespace=true]Comparison of three microVM monitors (VMMs)
Kata Containers can drive more than one virtual machine monitor (VMM), and the platform ships all three that Kata supports. Each trades compatibility, footprint, and boot time differently, so you can pick per workload:
QEMU (kata-qemu, the default). The most mature and full-featured VMM, with the broadest device model and guest compatibility. It carries a marginally larger memory footprint and slightly slower boot than the lighter VMMs, but it is the most battle-tested option. It uses the overlayfs snapshotter, so it co-locates on the shared kata-nested and kata-metal node pools. It is the right default for general agent workloads.
Cloud Hypervisor (kata-clh). A modern, Rust-based VMM optimized for cloud workloads with a minimal device model. It boots fast and runs lean — in our startup benchmark it had the quickest warm boot of the three — while still offering broader device support than Firecracker. It also uses overlayfs and shares the kata-nested/kata-metal pools, making it an easy lighter-weight alternative to QEMU.
Firecracker (kata-fc). AWS's purpose-built microVM monitor — the same technology behind AWS Lambda and AWS Fargate . Its deliberately minimal, security-first device model (virtio only, no PCI, no BIOS) gives it a tiny footprint and a fast, deterministic boot, which is exactly what high-density, multi-tenant execution of untrusted code wants. Firecracker requires a devmapper block snapshotter rather than overlayfs, so it runs on its own dedicated node pools (kata-fc and kata-fc-metal). For a per-client financial sandbox, where isolation density and blast-radius minimization matter most, it is the strongest fit.
VMM
(Runtime Class) | Snapshotter
node pool | Device model | Warm boot* | Best fit |
|---|---|---|---|---|
QEMU — kata-qemu (default) | overlayfs · kata-nested / kata-metal | Full, broad compatibility | ~2s | General default; widest guest and device support |
Cloud
Hypervisor — kata-clh | overlayfs ·
kata-nested / kata-metal | Minimal, modern
(Rust) | ~1s | Lightweight
alternative; fastest warm boot |
Firecracker — kata-fc | devmapper · kata-fc / kata-fc-metal | Minimal, security-first; virtio only (Rust, by AWS) | ~2s | High-density, multi-tenant, untrusted code |
Table 1. The three VMMs Kata Containers can drive on this platform. *Warm boot is the second-pod scheduled-to-Ready time on a node already running the runtime (nested-virt c8i.2xlarge); see Table 2 for full startup timings.
The microVM runtime is selected per workload by runtimeClassName. The platform ships three RuntimeClasses — kata-qemu (default), kata-clh, and kata-fc — each carrying the nodeSelector and toleration that steer the pod onto the right Karpenter node pool. Firecracker runs on its own pools because it needs a devmapper block snapshotter, wired up in the node's userData:
# Choosing the isolation runtime is a one-line change on the pod spec: # runtimeClassName: kata-qemu # QEMU microVM (default) # runtimeClassName: kata-clh # Cloud Hypervisor microVM # runtimeClassName: kata-fc # Firecracker microVM (fastest warm boot) # # The RuntimeClass carries scheduling so the pod lands on a matching node: apiVersion: node.k8s.io/v1 kind: RuntimeClass metadata: name: kata-fc handler: kata-fc-fc scheduling: nodeSelector: katacontainers.io/kata-runtime-fc: "true" tolerations: - key: kata-fc operator: Equal value: "true" effect: NoScheduleKata Containers gives each sandbox its own Linux kernel inside a lightweight virtual machine. The isolation boundary is enforced by the CPU's hardware virtualization, not by Linux namespaces, the same model AWS Fargate and AWS Lambda use under the hood.
Startup timing matters for a client-facing assistant, so the sample includes a benchmark script that measures node-boot and microVM-boot cost across all three VMMs. The headline result: warm VM boot is 1–2 seconds for every runtime; the dominant cost is node provisioning, which is exactly what the SandboxWarmPool is designed to hide.
VMM | Instance | Node boot (cold) | 1st pod (cold) | Cold total | 2nd pod (warm) |
|---|---|---|---|---|---|
kata-qemu | nested (c8i.2xlarge) | 100s | 4s | 104s | 2s |
kata-clh | nested
(c8i.2xlarge) | 94s | 5s | 99s | 1s |
kata-fc | nested (c8i.2xlarge) | 127s | 3s | 130s | 2s |
kata-qemu | metal
(c5.metal) | 121s | 8s | 129s | 2s |
kata-fc | metal (c5.metal) | 148s | 2s | 150s | 2s |
Table 2. VMM startup timings measured from Kubernetes object timestamps. Warm-pool binding turns a ~100-second cold path into a ~2-second warm one.
Building the client context tools with MCP
The agent should not hard-code data access. Instead, it reaches client context through MCP tools, small, well-described services that expose exactly one capability each. This keeps the agent portable, makes each data source independently auditable, and lets you scope permissions per tool. For a financial assistant, four tools cover most of the surface: portfolio, transactions, risk preferences, and market data.
An MCP tool server is a thin process that declares its tools and their input schema. The example below sketches a portfolio and market-data server; in production each tool is backed by your systems of record and secured with least-privilege IAM through EKS Pod Identity.
# mcp_client_context.py — MCP tool server for client context (illustrative) from mcp.server.fastmcp import FastMCP mcp = FastMCP("client-context") @mcp.tool() def get_portfolio(client_id: str) -> dict: """Return the client's current holdings, cost basis, and cash.""" # Backed by your book-of-record; scoped by IAM to this client only. return positions_store.load(client_id) @mcp.tool() def get_transactions(client_id: str, days: int = 90) -> list: """Return recent transactions for spending and cash-flow analysis.""" return ledger.recent(client_id, days=days) @mcp.tool() def get_risk_profile(client_id: str) -> dict: """Return risk tolerance, horizon, and stated constraints.""" return risk_store.load(client_id) @mcp.tool() def get_market_context(tickers: list[str]) -> dict: """Return delayed quotes and index levels for scenario inputs.""" return market_feed.snapshot(tickers) if __name__ == "__main__": mcp.run(transport="streamable-http")Scope data at the tool boundary. Each tool returns only what a computation needs, keyed by the authenticated client_id — never the full client record, and never another client's data. The tool server, not the agent, is the enforcement point for row-level access.
Creating the financial assistant agent
The agent is configured with a model, a system prompt, and access to its tools. The system prompt is where the domain guardrails live: it defines the assistant as an educator and thinking partner — not a fiduciary — and encodes hard rules that no recommendation logic should ever cross.
# system prompt (excerpt) — the domain guardrails the agent must never cross You are a personal financial assistant. You are an educator and thinking partner — not a fiduciary, not a CFP, not a CPA, not a tax attorney. # Hard rules - NEVER recommend specific securities. "Buy VTSAX" is forbidden. - NEVER promise or imply guaranteed returns. Always frame projections as conditional on assumptions. - For any material decision (rollover, Roth conversion over $10k, estate planning), explicitly recommend consulting a licensed professional. - NEVER ask for or echo SSNs, account numbers, or credentials. # Scenario math When the user asks "what if" questions, use the Python tool inside the sandbox to run actual math — do not hand-wave. Show the assumptions, the formula, the result, and one sensitivity (return 1% lower, horizon 5y shorter).The critical instruction is the last one. Rather than letting the model narrate an approximate answer, the agent is told to compute inside the sandbox. That is the difference between a chatbot and a financial assistant and the reason the sandbox exists.
Parameterized computation templates
Generating code from scratch on every request is slow and hard to audit. Instead, the assistant ships a small library of reviewed, parameterized computation templates, Monte Carlo projection, tax-loss harvesting, spending analysis, and amortization, that the LLM fills in with the client's numbers and executes in the sandbox. You review the template once; the model only supplies parameters.
# templates/monte_carlo.py — reviewed once, parameterized per client import numpy as np def project(balance, monthly, years, mean_return, vol, n=10_000, seed=0): """Monte Carlo wealth projection. Returns p10/p50/p90 terminal values.""" rng = np.random.default_rng(seed) months = years * 12 mu, sigma = mean_return / 12, vol / (12 ** 0.5) paths = np.full(n, float(balance)) for _ in range(months): paths = paths * (1 + rng.normal(mu, sigma, n)) + monthly return { "p10": float(np.percentile(paths, 10)), "p50": float(np.percentile(paths, 50)), "p90": float(np.percentile(paths, 90)), "assumptions": {"mean_return": mean_return, "vol": vol, "years": years, "monthly": monthly, "runs": n}, }Because the template returns its assumptions alongside the result, every projection is self-documenting, which is exactly what the regulatory-explainability requirement asks for. The agent presents the median, the range, and one sensitivity, and it saves non-trivial scenarios to the client's workspace for later reference.
Securing personalization with Agent Sandbox
This is the core of the design. The SandboxTemplate defines a pod that runs as a Kata microVM, drops all Linux capabilities, runs non-root with a seccomp profile, mounts secrets from tmpfs (never environment variables), and mounts a per-user workspace. The SandboxWarmPool keeps a buffer of these ready to bind.
# sandbox-template.yaml (trimmed) — the pod every warm sandbox runs apiVersion: extensions.agents.x-k8s.io/v1beta1 kind: SandboxTemplate metadata: name: finance-sandbox namespace: finance-assistant spec: service: true networkPolicyManagement: Unmanaged # we own the NetworkPolicy (below) podTemplate: spec: runtimeClassName: kata-qemu # or kata-fc for Firecracker microVMs automountServiceAccountToken: false securityContext: runAsUser: 1000 runAsNonRoot: true seccompProfile: { type: RuntimeDefault } containers: - name: agent securityContext: allowPrivilegeEscalation: false capabilities: { drop: [ALL] } resources: requests: { cpu: 500m, memory: 1Gi } limits: { cpu: 2, memory: 4Gi } --- apiVersion: extensions.agents.x-k8s.io/v1beta1 kind: SandboxWarmPool metadata: name: finance namespace: finance-assistant spec: replicas: 1 # warm buffer; scale for concurrency sandboxTemplateRef: { name: finance-sandbox }When a user arrives, a lightweight session router turns their authenticated identity into a stable, non-reversible suffix and creates one SandboxClaim per user. The claim references the warm pool, stamps a per-user label onto the bound pod (network policies key on it), and sets a sliding idle lease with shutdownPolicy: Delete so the sandbox is reclaimed automatically after the session goes quiet.
# The SandboxClaim the router creates per user (rendered from server.js) apiVersion: extensions.agents.x-k8s.io/v1beta1 kind: SandboxClaim metadata: name: finance-claim-<user-suffix> # sha256(sub)[:10] — no PII in etcd namespace: finance-assistant labels: { sandbox.users.io/user-suffix: <user-suffix> } spec: warmPoolRef: { name: finance } additionalPodMetadata: labels: { sandbox.users.io/user-suffix: <user-suffix> } lifecycle: shutdownPolicy: Delete # reclaim on idle — no reaper CronJob shutdownTime: <now + 30m> # renewed on every message (sliding)The router's provisioning logic is deliberately tiny — get-or-create the claim, renew the lease, wait for the controller to bind a sandbox, then read its service address and proxy the chat stream:
// session-router (excerpt) — get-or-create claim, then proxy the SSE stream const suffix = sha256(sub).slice(0, 10); // stable, non-reversible await ensureClaim(suffix, sub); // bind warm pod or cold-create const bound = await waitForBoundSandbox(suffix); // poll claim -> serviceFQDN await proxyChat(res, bound.fqdn, suffix, body); // stream tokens back to the UIPer-client data scoping and network isolation
Two boundaries keep one client's data away from another's. First, network policy: a bound sandbox may reach only the LiteLLM gateway and cluster DNS, nothing else, not even the open internet. Even if the agent decides to “look something up,” it physically cannot. Second, ingress is locked so that only the session router can reach a per-user sandbox, preventing one user from targeting another's service name.
# networkpolicy.yaml (egress, trimmed) — sandbox can reach ONLY LiteLLM + DNS apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: { name: finance-sandbox-egress, namespace: finance-assistant } spec: podSelector: matchExpressions: - { key: sandbox.users.io/user-suffix, operator: Exists } policyTypes: [Egress] egress: - to: [{ namespaceSelector: { matchLabels: { kubernetes.io/metadata.name: litellm }}, podSelector: { matchLabels: { app.kubernetes.io/name: litellm }}}] ports: [{ port: 4000, protocol: TCP }] - to: [{ namespaceSelector: { matchLabels: { kubernetes.io/metadata.name: kube-system }}, podSelector: { matchLabels: { k8s-app: kube-dns }}}] ports: [{ port: 53, protocol: UDP }, { port: 53, protocol: TCP }]Per-client state lives on a shared Amazon EFS volume mounted at /workspace, with each client rooted at /workspace/users/<suffix>. Because the EFS data lives outside the claim lifecycle, a client's goals, saved scenarios, and decision log survive sandbox teardown, the next sign-in re-binds a fresh warm sandbox onto the same directory.
End-to-end walkthrough
Here is a full interaction, from sign-in to sandboxed computation to streamed response.

Figure 2. Request flow for a single client interaction. The browser reaches the ALB and finance-ui; the session router warm-binds a Kata microVM from the SandboxWarmPool; the sandbox's only egress is LiteLLM, which calls Amazon Bedrock with a Guardrail; Claude tokens stream back over SSE. A per-user Amazon EFS workspace persists across sessions, and the SandboxClaim lease reclaims the sandbox on idle.
- Sign-in and warmup. the client signs in through Amazon Cognito . On success, the UI fires a fire-and-forget warmup call so the sandbox is provisioned in the background while the client is still deciding what to ask.
- Claim and bind. the router hashes the client's identity to a suffix and get-or-creates their SandboxClaim. The controller binds a pre-warmed sandbox in about two seconds (or cold-creates one, prompting Karpenter to add a node if the pool is empty).
- Context and computation. the client asks a “what if” question. The agent pulls context through its MCP tools, parameterizes the relevant computation template with the client's numbers, and executes it inside the microVM.
- Inference and response. every model call goes through LiteLLM to Amazon Bedrock, where a finance-specific Guardrail filters PII and denied topics. Tokens stream back over Server-Sent Events; the assistant shows the median projection, the range, and a sensitivity, then offers to save the scenario.
- Idle teardown. after 30 minutes of silence, the claim's lease deletes the sandbox and Karpenter reclaims the node. The EFS workspace persists.

Figure 3. The finance assistant sign-in screen (Amazon Cognito, @company.com sign-up gate).

Figure 4. A streamed response from Financial Assistant live.
Observability and cost controls
Because computation crosses a microVM boundary, observability has to span it. The sample ships Prometheus and Grafana, with LiteLLM exporting request rate, latency, token usage, and per-key spend — giving you cost attribution per client out of the box. LiteLLM also enforces a hard monthly budget cap per virtual key, so a runaway session cannot run away with your bill.
- Metrics (Prometheus + Grafana). scrape LiteLLM, the controller, and node metrics; alert on sandbox bind latency and warm-pool depletion.
- Cost tracking. LiteLLM tracks tokens and dollars per virtual key; set a budget per client tier.
- Tracing (optional). the design extends cleanly to LLM tracing (for example, Langfuse) for prompt/response traces and to distributed tracing (for example, Jaeger) to follow a request across the UI, router, sandbox, and gateway.
Deploying to Amazon EKS
Prerequisites
- Tooling: the AWS Command Line Interface (AWS CLI), Terraform 1.7 or later, and kubectl.
- Amazon Bedrock model access: enable access to the Claude models you intend to use (for example, Claude Opus and Claude Haiku) in your target Region.
- Account: AWS credentials with permission to create the VPC, EKS cluster, IAM roles, and supporting resources.
Deploy the platform
The sample deploys with a single script that runs Terraform and bootstraps Argo CD, which then reconciles the whole platform in dependency order using sync waves.
git clone https://github.com/elamaran11/eks-platform-openclaw cd eks-platform-openclaw cp .env.example .env # set account, Region, domain, Cognito, cert $EDITOR .env chmod +x scripts/install.sh ./scripts/install.sh # terraform apply -> Argo CD bootstrap (~15 min)Argo CD reconciles the app-of-apps in waves so ordering is guaranteed: the Karpenter controller and the Agent Sandbox CRDs first, then node pools and Kata runtime classes, then the Kata runtime install, then LiteLLM, then the workload apps and the UI.
Wave | Applications | Purpose |
|---|---|---|
-1 | karpenter, agent-sandbox | Karpenter controller + Agent Sandbox CRDs |
0 | karpenter-nodepools,
kata | Node pools +
EC2NodeClasses; Kata RuntimeClasses |
1 | kata-deploy, kata-deploy-fc, monitoring | QEMU/CLH + Firecracker install; Prometheus/Grafana |
2 | litellm | OpenAI-compatible
proxy to Amazon Bedrock + Guardrails |
3 | openclaw, external-dns, ingress | Operator, DNS, ALB IngressClass |
4 | finance-assistant | SandboxTemplate
+ WarmPool + EFS + NetworkPolicies + router |
5 | finance-assistant-ui | Next.js UI + ALB Ingress + Cognito |
Verify
# Warm pool and per-user sandboxes kubectl get sandboxwarmpool -n finance-assistant kubectl get sandbox -n finance-assistant # Confirm a sandbox is a real microVM (guest kernel != host kernel) kubectl exec -n finance-assistant <sandbox-pod> -c agent -- uname -r # Router decisions (claim create, warm-bind, lease renewals) kubectl logs -n finance-assistant -l app=finance-session-router --tail=50 # LiteLLM health and metrics kubectl get pods -n litellmOutput validation and guardrails before client delivery
Two layers protect the client. At the model layer, a finance-specific Amazon Bedrock Guardrail is applied to every request through LiteLLM: it denies specific-security recommendations, guaranteed-return language, insider information, and tax-evasion guidance, and it blocks or anonymizes financial PII (SSNs, account and routing numbers, cards). At the application layer, validate computation output for reasonableness before it reaches the client, and redact any secrets from the stream.
# Bedrock Guardrail overlay (excerpt) — finance-specific denied topics + PII topic_policy_config { topics_config { name = "SpecificSecurityRecommendations" type = "DENY" ... } topics_config { name = "GuaranteedReturns" type = "DENY" ... } topics_config { name = "InsiderOrMaterialNonPublic" type = "DENY" ... } topics_config { name = "TaxEvasion" type = "DENY" ... } } sensitive_information_policy_config { pii_entities_config { type = "US_SOCIAL_SECURITY_NUMBER" action = "BLOCK" } pii_entities_config { type = "US_BANK_ACCOUNT_NUMBER" action = "BLOCK" } pii_entities_config { type = "CREDIT_DEBIT_CARD_NUMBER" action = "BLOCK" } pii_entities_config { type = "EMAIL" action = "ANONYMIZE" } }Design for the sandbox being briefly unavailable. If a warm pod cannot be bound within your timeout, fall back to pre-computed insights or a clear “one moment” state rather than failing the request — clients should never see an error where a number belongs.
Design Considerations
- Warm-pool sizing is the latency lever. pre-warming the right number of microVM-backed pods eliminates cold-start latency while keeping cost manageable. Tune it from bind-latency and pool-depth metrics, not by guessing.
- Scope data at the sandbox boundary. inject only what a computation needs, keyed by the authenticated client, through the MCP tool boundary — never the full client record.
- Use parameterized computation templates. review templates once; let the model supply parameters. It is faster, cheaper, and auditable.
- Validate outputs for reasonableness. a projection that returns its own assumptions is a projection you can audit.
- Kata + Firecracker fits this workload. hardware-virtualization isolation with near-native performance is exactly what untrusted, LLM-generated financial code needs.
- Let the SandboxClaim lifecycle do the cleanup. the claim's sliding lease reclaims resources automatically — no reaper job, no leaked pods.
- Design for graceful degradation. fall back to pre-computed insights when a sandbox cannot be bound in time.
Cleaning up
To avoid ongoing charges, tear down everything the sample created:
./scripts/cleanup.sh # terraform destroy + Argo CD teardownConclusion
In this post, we built a personalized financial assistant on Amazon EKS that computes per-client answers instead of retrieving generic ones — and does it safely. The Agent Sandbox project gave us pre-warmed, per-request isolation through SandboxTemplate, SandboxWarmPool, and SandboxClaim; Kata Containers with Firecracker microVMs gave us a hardware-enforced boundary around untrusted, model-generated code; MCP standardized how the agent reaches client context; and Amazon Bedrock kept inference and client data inside your AWS account. The result is a blueprint you can stand up in about an hour and extend to other financial domains — lending, insurance, and credit — by adding tools and templates, not rebuilding the platform.
Agent Sandbox is a fast-moving Kubernetes SIG Apps subproject, and running it on Amazon EKS with Kata and Firecracker positions EKS as the enterprise platform for this emerging workload pattern. Clone the sample, deploy it in your account, and adapt the tools and templates to your own book of record.
To learn more, see the Agent Sandbox project (kubernetes-sigs/agent-sandbox) , the Kata Containers and Firecracker documentation, the Amazon EKS documentation, and the Amazon Bedrock documentation.
About the authors

Elamaran (Ela) Shanmugam is a Senior Container and AI Infrastructure Specialist Solutions Architect at Amazon Web Services with over 20 years of experience in enterprise systems and infrastructure. Ela specializes in container technologies, app modernization, observability, and machine learning, Generative AI, Agentic AI, helping AWS Global Financial Services customers and partners design scalable and secure container workloads. Based in Tampa, Florida, Ela contributes to open source projects, speaks at events, mentors, and creates technical content.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article