AWS Builds Serverless MCP Gateway for Data Lakes
- •AWS built a serverless MCP gateway on ECS Fargate for North America Sort Center planning teams to query enterprise data conversationally.
- •A metadata JSON file makes new datasets discoverable to connected agents after the next pipeline sync, avoiding per-dataset integration code.
- •AWS reports 15–20 second end-to-end interactions in testing, with shared authentication, SELECT-only SQL tools, and logged tool calls.
AWS says its team built a serverless Model Context Protocol (MCP) server on Amazon ECS Fargate to give planning teams in Amazon’s North America Sort Center network conversational access to an enterprise data lake. The gateway lets multiple AI agents use shared data tools and access controls. Adding a dataset requires a metadata JSON file, which the system discovers after the next pipeline sync.
The system addresses a data lake containing thousands of datasets. Previously, teams built separate integrations for each agent, duplicating SQL generation, schema knowledge, and connection handling; a schema change could require patching every agent. Onboarding a dataset typically took multiple days per table and required custom tool code, query validation, and redeployment. AWS set four goals: configuration-only dataset additions, tools usable by any MCP-compatible client, centralized permission enforcement, and infrastructure that scales with bursts in demand.
The architecture has four independently scalable layers: client, MCP server, tools, and knowledge-base refresh. A metadata catalog stores schema descriptions, column meanings, and table relationships for agents to use when generating SQL, avoiding hardcoded table structures. New metadata is indexed as it arrives. Client requests pass through Route 53, a public Application Load Balancer with HTTPS and AWS WAF, and Amazon Cognito authentication before reaching ECS Fargate services in private subnets. DynamoDB stores session history; an internal load balancer routes requests to the separate MCP server. Amazon Bedrock powers the agent’s tool orchestration, and Bedrock Guardrails applies to every model interaction.
The tools include SQL queries through Amazon Athena and Redshift, document and metadata search, and policy search through Amazon Bedrock Knowledge Bases. For an Athena query, the agent checks the metadata catalog, generates SQL with Bedrock, validates and auto-corrects it for Athena, then returns results in natural language. The tools allow SELECT-only queries and reject write operations before they reach the data lake. AWS says context mapping can limit catalog searches to relevant tables; in testing, end-to-end interactions took 15–20 seconds.
Dataset onboarding uses a JSON metadata file describing the table, its business context, and column meanings, with an optional context mapping entry. Fields can provide query hints, descriptions, and sample values; AWS gives warehouse codes such as FC-EAST-07 as an example of sample values that help guide WHERE clauses. A pipeline creates vector embeddings (numerical representations used for search) with Amazon Titan Text Embeddings and indexes the metadata in Bedrock Knowledge Bases. After indexing, connected agents can discover the table without manual re-indexing or server restarts.
AWS illustrates the flow with a request for the 10 highest-value orders last month: context narrows the search, the agent finds a matching schema and generates SQL, and Athena runs the validated query. The tested flow completes within 15–20 seconds. The same server can combine an Athena result with document search in one response, for example pairing a return-rate figure with a product team’s analysis. AWS says the server runs in private subnets, authenticates users through Cognito, and logs tool calls as structured JSON in CloudWatch. ECS Fargate services scale based on CPU use, with a 50% threshold for the client layer; the server layer uses CPU and memory. AWS says Athena and Bedrock scale through their services, allowing a single query or hundreds of concurrent queries without configuration changes. The endpoint is available in AWS Regions where Bedrock and Bedrock Knowledge Bases are available.