explainx.ai0k
TrendingAI News TodayPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

follow on google

Add explainx.ai as a preferred source

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

community

Join the community

learn

mind: share how you thinkpathways — start freeworkshopsbootcampscoursescompare Explainxcertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcpestacktoolsmdx readeragentsllmsdesignsdictionarypeopleagi trackerfelony benchranks

company

aboutvisionmissionteaminstructorsteach on explainxpartnershipscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

explainx.ai

On this page

  • TL;DR: the design in one table
  • The problem: every agent reinvents data access
  • The architecture: four layers
  • The metadata file is the product
  • What happens when someone asks a question
  • Security: layers, not a single gate
  • Scaling and multi-tenancy
  • Limits and open questions
  • Questions teams will ask before building this
  • What to copy for your own stack
  • Related reading
← Back to blog

explainx / blog

Serverless MCP Server on ECS Fargate: Give AI Agents Data Lake Access With One JSON File

MCP, AWS, AI Agents, Data Engineering

Part of Model Context Protocol (MCP)

Amazon built a serverless MCP server on ECS Fargate for data lake access. How the metadata-driven design, Athena SELECT-only tools and guardrails work.

Nov 6, 2026·8 min read·Yash Thakker
add explainx.ai
go deep
Serverless MCP Server on ECS Fargate: Give AI Agents Data Lake Access With One JSON File

An Amazon team has described how it built a serverless Model Context Protocol server on Amazon ECS with AWS Fargate to let AI agents query an enterprise data lake. The headline design choice: exposing a new dataset requires only a JSON metadata file, with no per-dataset integration code. The AWS Machine Learning blog post comes from the team supporting Amazon's North America Sort Center network, where planning teams rely on operational data for capacity, labor and package flow.

TL;DR: the design in one table

table · 2 cols
QuestionAnswer from the AWS post
What problem does it solve?Every agent rebuilt its own SQL generation, schema knowledge and access control
How is a dataset added?One metadata JSON file, discovered on the next pipeline sync
Which clients work?Any MCP-compatible client via the /mcp endpoint
Where is access enforced?Centrally, at the MCP server layer
Can it write data?No, Athena tools are SELECT-only
How fast?15 to 20 seconds end to end in the team's testing
Where does it run?ECS Fargate, stateless tasks with state in DynamoDB

The problem: every agent reinvents data access

The authors describe a common starting point: wire agents straight to databases and APIs with no shared gateway. Each new dataset needs custom code, and each agent reimplements access control. Their data lake holds thousands of datasets, and several teams built their own assistants. Each embedded its own SQL generation logic and connection handling, so a schema change meant patching every agent. There was no single audit point, and onboarding a table was typically a multi-day effort.

They set four goals: configuration-driven access, agent-agnostic tool interfaces, centralized permission enforcement, and elastic infrastructure for bursty AI workloads. If you have read our explainer on MCP, this is the standard argument for a protocol gateway applied to enterprise data.

The architecture: four layers

  1. Client layer. A request goes through Amazon Route 53 to an Application Load Balancer with HTTPS and AWS WAF. Amazon Cognito authenticates the user with JSON Web Tokens, and Amazon DynamoDB stores sessions. The client runs on ECS Fargate.
  2. MCP server layer. A separate Fargate cluster in a private subnet behind an internal load balancer. A Bedrock-powered agent orchestrates tools built with FastMCP, a Python framework for MCP servers. Tasks are stateless, with conversation state in DynamoDB, so they can be replaced or scaled without data loss.
  3. Tools layer. SQL query tools against Amazon Athena and Amazon Redshift, document and metadata search over Amazon Bedrock Knowledge Bases, and policy search over the same service.
  4. Knowledge-base refresh layer. Metadata files are embedded with Amazon Titan Text Embeddings and indexed so new tables become discoverable.

Agents sharing one workspace through a central MCP gateway to the data lakeAgents sharing one workspace through a central MCP gateway to the data lake

The metadata file is the product

The notable idea is that the schema knowledge lives in data, not code. The example file in the post includes the database service, database and table names, a business description, column details, load type, refresh frequency, table size and timestamps. Two details stand out.

First, the business description carries engine-specific hints. The authors give one: in Athena SQL, always wrap string literals in date() when comparing against timestamp columns. That kind of hint reduces SQL validation failures.

Second, each column pairs name and type with a natural-language description and sample values. The post says sample values matter for accurate WHERE clauses, because the agent learns that a warehouse column holds codes like FC-EAST-07, not phrases like "East region facility."

An optional context mapping narrows search to named tables per business domain. If none is given, the agent searches all indexed tables. The authors say scoping reduces latency and improves SQL accuracy, and keeps interactions in the 15 to 20 second range in their testing.

What happens when someone asks a question

For a question such as "What were our top 10 highest-value orders last month?", the client first adds business context. The agent embeds the question, searches the metadata catalog, and picks the most relevant table with a lightweight LLM call. It then generates SQL from the schema, column descriptions and hints, validates and auto-corrects it for Athena compatibility, and runs it. Results come back as a natural-language answer. The same server can answer mixed questions, such as a Q4 return rate from Athena plus a product team's analysis from the knowledge base, in one turn.

Security: layers, not a single gate

According to the post:

  • The MCP server sits in private subnets and is not internet-reachable. Only the client layer can route to it.
  • Cognito validates identity at the client layer and only token-bearing requests go downstream.
  • Athena tools reject non-SELECT statements before they reach the lake.
  • Amazon Bedrock Guardrails applies to every model interaction, designed to filter harmful content, enforce grounding checks and help block prompt injection.
  • Every tool invocation is logged to Amazon CloudWatch as structured JSON, giving security teams one audit point.

The authors note the architecture is available in Regions where Bedrock and Bedrock Knowledge Bases are available. For more on how AWS thinks about bounding agent actions, read our post on AWS trust in depth for agent autonomy.

Weekly digest3.6k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

Scaling and multi-tenancy

Client and server layers use ECS Service Auto Scaling, with a CPU threshold of 50 percent noted for the client. Athena and Bedrock scale as managed services. Because the /mcp endpoint accepts any compatible client regardless of model or orchestration framework, adding a new agent means pointing it at the endpoint. Our guide to the AWS Agent Registry covers a related approach for discovering tools at runtime.

Limits and open questions

The post is candid about next steps, which also reveal today's gaps:

  • Column-level control. The authors plan finer-grained access, where table owners mark sensitive columns as restricted per permission group and the agent excludes them from generated SQL. That implies it is not there yet.
  • Feedback loop. Failed or low-confidence queries do not yet automatically produce suggestions to improve descriptions or hints.
  • Latency. Fifteen to twenty seconds suits planning questions but not interactive dashboards.
  • No public code. The post shows configuration, not a repository.
  • Accuracy numbers. It reports no text-to-SQL accuracy rate, so judge quality by testing on your own tables.

Questions teams will ask before building this

Why a separate MCP server instead of tools inside each agent? The authors' answer is drift. When each agent embeds its own SQL generation and access rules, a schema change or a permission change has to be made in every agent. A shared server turns that into one change. It also gives security a single place to audit, which the post names as a design goal.

Why metadata files and not a live schema crawl? A crawl gives column names and types but not meaning. The post's files carry business descriptions, engine-specific query hints and sample values, which are the facts a model needs to write correct SQL. Those facts come from people who own the data, so a file that table owners can edit and review fits that workflow.

Why Fargate? The workload is bursty and the tasks are stateless, with conversation state in DynamoDB. That suits a serverless container platform where tasks can be replaced or scaled without data loss and nobody manages EC2 instances.

What stops a bad query? Several things, at different layers: authentication at the client, a private network path to the server, SELECT-only enforcement in the Athena tools, SQL validation and auto-correction, and Bedrock Guardrails on model interactions. No single layer is trusted alone, which is the right instinct for any agent that can reach real data.

What would we test first? Accuracy on your own tables. The post reports latency but no accuracy figure, and text-to-SQL quality depends heavily on how well descriptions and sample values are written. Build a small set of questions with known answers, run them after each metadata change, and track failures the way you would track unit tests.

What about sensitive columns? The authors list column-level restrictions as future work. Until you have them, keep sensitive tables out of the indexed set or put them behind a separate server and permission scope.

What to copy for your own stack

  1. Put schema meaning in versioned metadata files, including sample values and engine hints.
  2. Keep agents thin and the tool layer shared, so data access outlives any one agent.
  3. Enforce read-only at the tool, not in the prompt.
  4. Scope searches with domain mappings before generating SQL.
  5. Log every tool call in one place.

For related AWS agent guides, see the Bedrock managed knowledge base with agentic retrieval and Claude Code remote sessions on Bedrock AgentCore. If you let agents touch data, AgentBeam, the agent security platform from the explainx.ai team, stops AI agents before they take dangerous actions.

Related reading

  • What is MCP: Model Context Protocol guide
  • AWS trust in depth for agent autonomy
  • AWS Agent Registry and runtime tool discovery
  • Bedrock managed knowledge base with agentic retrieval
  • Claude Code remote sessions on Bedrock AgentCore
  • Model Context Protocol specification

Details are accurate as of November 6, 2026 and reflect the AWS post published that day.

Spotted something out of date? Let us know.
Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

View Yash Thakker in People in AI →

Related posts

Nov 6, 2026

Okta Cross App Access and AgentCore Gateway: Governing AI Agents at Scale (Part 2)

Part 2 of the AWS and Okta series swaps per-server checks for one AgentCore Gateway front door with default-deny Cedar policy, adds a second agent on EKS, and traces every allow and deny. Here is the design, the test results, and the caveats.

Nov 5, 2026

Web Answer on Amazon Bedrock AgentCore: Cited Answers in One Tool Call

Amazon Bedrock AgentCore now offers Web Answer, a managed gateway connector that plans searches, reads pages and returns a synthesized, source-cited answer in a single tool call. Here is how it works, the three setup steps, the limits, and when to pick it over Web Search.

Oct 20, 2026

AWS Agent Registry: How Agents Discover MCP Tools and A2A Agents at Runtime

On October 20, 2026 the AWS Machine Learning blog described AWS Agent Registry, a managed catalog of MCP servers, agents and agent skills, and a Python sample where an orchestrator discovers tools by semantic search at request time. Here is how the discover, instantiate, execute loop works, the approval workflow, the security design, and the limits AWS itself states.