Amazon Web Services Deploys Serverless Model Context Protocol Architecture to Streamline Enterprise Data Lake Access for AI Agents

Organizations building applications powered by artificial intelligence face a recurring, complex challenge: giving large language model (LLM) agents seamless, secure access to sprawling enterprise data lakes without duplicating integration logic across every distinct agent and application. Historically, engineering teams began their development journeys by wiring artificial intelligence agents directly to disparate databases and application programming interfaces with no shared gateway, such as a Model Context Protocol (MCP) server, operating in the middle. Consequently, each new dataset demanded custom code implementation, and every individual agent reimplemented its own access control mechanisms. As the overall volume of datasets or deployed agents expanded over time, permission enforcement invariably drifted, transforming the onboarding of a new data source into a frustrating, multi-day engineering bottleneck.
To tackle this enterprise-scale architectural friction head-on, technical teams supporting Amazon’s North America Sort Center network—where planning organizations heavily rely on real-time operational data to carefully manage physical capacity, workforce allocation, and package flow—developed a serverless Model Context Protocol server running on Amazon Elastic Container Service utilizing AWS Fargate. This centralized, agent-agnostic gateway sits directly between artificial intelligence agents and the corporate data lake. Rather than writing custom integration scripts for every new table, engineers can now expose a new dataset simply by drafting a JSON metadata file that the server automatically discovers during the next pipeline synchronization cycle.
This metadata-driven approach fundamentally eliminates the traditional need for per-dataset integration code while simultaneously supporting multiple agents and applications within a secure, multi-tenant environment. The development of this infrastructure addresses long-standing fragmentation within enterprise data ecosystems, setting a new technical benchmark for how modern cloud systems handle conversational intelligence queries over structured and unstructured repositories.
The Scaling Challenge and Architectural Design Goals
The genesis of this serverless architecture stems from two interrelated structural hurdles that frequently plague large-scale corporate data environments: fragmented data access patterns and an inherently unsustainable onboarding model. Within Amazon’s fulfillment and logistics network, data lakes house thousands of individual datasets encompassing granular operational metrics, extensive business analytics, and domain-specific telemetry. As multiple internal business teams sought to deploy conversational artificial intelligence assistants capable of querying this vast expanse of information, each team inadvertently built its own proprietary integration framework from scratch.
Under these legacy silos, every agent embedded its own unique SQL generation logic, hardcoded schema knowledge, and isolated connection handling protocols. Consequently, a minor database schema modification required tedious, manual patching across every single deployed agent. Furthermore, access control remained dangerously fragmented, lacking any single, centralized audit point for tracking data access decisions. Onboarding a new dataset traditionally demanded custom tool code writing, rigorous query validation, and full application redeployment—a cumbersome process that consumed multiple days of engineering bandwidth per table.
To resolve these systemic inefficiencies, system architects established four rigorous foundational design goals:
- The complete elimination of hardcoded per-dataset integration code through dynamic metadata discovery.
- The enforcement of centralized, standardized access controls and security guardrails across all connected client applications.
- The absolute decoupling of rapidly evolving artificial intelligence orchestration layers from stable underlying data storage mechanisms.
- The establishment of a fully serverless, highly scalable multi-tenant execution environment capable of handling high query concurrency with minimal operational overhead.
Comprehensive Architecture Walkthrough and Component Breakdown
The resulting system architecture enforces a clean separation of concerns by dividing operations into four distinct, independently scalable layers: the client layer, the Model Context Protocol server layer, the tools layer, and the knowledge-base refresh layer. Underpinning the entire framework is a centralized metadata catalog that stores granular schema descriptions, column-level semantics, and complex table relationships. Because the artificial intelligence agent dynamically derives its schema knowledge directly from this catalog at query time, system administrators no longer need to hardcode table structures or redeploy software applications when underlying database schemas evolve.
The request lifecycle begins when a user submits a conversational query from a client application, which may range from a dedicated web chat interface and internal Slack bot to an integrated development environment plugin or an external autonomous agent. Traffic resolves through Amazon Route 53 for domain name system lookup and arrives at an Application Load Balancer deployed in a public subnet, fortified with HTTPS encryption and AWS WAF protection against common web vulnerabilities.
The load balancer seamlessly routes incoming requests to Amazon Cognito, which authenticates the user via JSON Web Tokens and enriches the transmission. Authenticated traffic then crosses into a private subnet housing the client layer running on Amazon ECS Fargate. This layer manages active session states using Amazon DynamoDB and forwards validated requests through an internal Application Load Balancer directly into the Model Context Protocol server layer, which also operates on Amazon ECS Fargate.

Within the Model Context Protocol server layer, an artificial intelligence agent powered by Amazon Bedrock orchestrates specialized tools built using FastMCP, a high-performance Python framework designed for constructing MCP servers. To maintain enterprise-grade safety, Amazon Bedrock Guardrails are actively applied to every single model interaction. On the data management side, the tool backends execute operations via Amazon Athena and Amazon Redshift for structured SQL queries against the data lake, while Amazon Bedrock Knowledge Bases handles semantic vector search for unstructured documents. Automated data ingestion into Amazon Simple Storage Service and the underlying knowledge bases is expertly managed by AWS Lambda functions.
Streamlined Dataset Onboarding via Metadata Configuration
One of the most transformative aspects of this architecture is its configuration-driven extensibility. Onboarding a new dataset no longer requires writing custom software code; instead, it relies entirely on a structured JSON metadata file accompanied by an optional context mapping entry. This metadata file serves as the definitive single source of truth, detailing the target database service, database name, table name, comprehensive business descriptions, and exact column-level semantics.
For instance, metadata definitions incorporate specific operational hints within their business description fields—such as instructing the agent to always wrap string literals with specific date formatting functions when comparing against timestamp columns. This level of precise guidance drastically minimizes SQL validation errors and query execution failures. Additionally, the inclusion of sample values for individual columns allows the agent to learn real data patterns organically, understanding whether a column stores alpha-numeric facility codes or fully spelled-out regional names.
Once an engineer uploads the metadata JSON file, an automated pipeline generates high-dimensional vector embeddings using Amazon Titan Text Embeddings and indexes them directly into Amazon Bedrock Knowledge Bases. Once indexed, the newly introduced table becomes instantly discoverable by all connected artificial intelligence agents and applications without requiring manual server restarts or software re-indexing cycles.
Robust Security Controls and Multi-Tenant Isolation
Security within enterprise artificial intelligence deployments requires a defense-in-depth posture, and this architecture implements layered safeguards rather than relying on a single vulnerability point. The core Model Context Protocol server executes entirely within private subnets behind an internal Application Load Balancer, rendering it completely unreachable from the public internet. Only the designated client layer—shielded by a public-facing Application Load Balancer and AWS WAF—possesses the necessary routing privileges to communicate with the server.
User identity verification is strictly enforced at the perimeter via Amazon Cognito, ensuring that only authenticated, token-bearing requests penetrate the internal network. At the tool execution layer, Amazon Athena query tools are strictly constrained to execute read-only SELECT operations, systematically intercepting and rejecting any unauthorized write or modification attempts before they can ever reach the enterprise data lake.
Furthermore, all tool invocations are persistently logged to Amazon CloudWatch using structured JSON formats, providing corporate security teams with a centralized, immutable audit trail for data access across every active agent and application. Because the standardized /mcp endpoint accepts any compliant client regardless of the underlying language model or orchestration framework, multiple independent business units can safely share the same underlying tool infrastructure without compromising enterprise security boundaries.
Serverless Scaling and Future Technological Roadmap
To accommodate fluctuating enterprise workloads efficiently, every tier of the architecture leverages auto-scaling paradigms tailored to its specific operational demands. The client and Model Context Protocol server layers utilize Amazon ECS Service Auto Scaling driven by real-time CPU and memory utilization metrics. Meanwhile, underlying data services like Amazon Athena and Amazon Bedrock scale automatically as fully managed cloud services, effortlessly absorbing spikes from a single user query to hundreds of concurrent enterprise requests.
Looking toward the future, system architects are actively extending this framework in two primary directions. First, engineering teams are developing finer-grained access control mechanisms that will allow individual table owners to designate specific columns as restricted based on user permission groups. Under this upcoming enhancement, the artificial intelligence agent will automatically exclude restricted columns from generated SQL queries without requiring manual prompt-level modifications.
Second, developers are constructing closed-loop feedback systems designed to automatically capture failure patterns when queries fail or produce low-confidence results. By analyzing these operational anomalies, the system will surface targeted suggestions for refining column descriptions and injecting improved query hints, ensuring continuous self-optimization across the entire enterprise data ecosystem.







