AI Cloud Architect

Building a serverless A2A gateway for agent discovery, routing, and access control

AWSHow-to by Reilly Manton, Scott Wainner and Wesley PetryAWS Artificial Intelligence Blog

In this post, you will learn how to build a serverless A2A gateway on AWS that hosts multiple agents behind a single domain using path-based routing (/agents/{agentId}). Standard A2A clients work without modification.

Read the original (opens the source's page in a new tab)

AI: Summary

What it is

A reference serverless gateway on API Gateway, Lambda, Cognito and DynamoDB that fronts multiple A2A agents on one domain with path-based routing, scope-based access and rate limits.

Who it is for

Cloud architects running multiple AI agents across teams or clouds who need one place to register, discover and control access to them.

Key points

  • Deployed with Terraform; the sample includes Weather and Calculator example agents.
  • Access is granted per OAuth scope in a DynamoDB Permissions table; rate limits are per user and per agent.
  • Uses a REST API for SSE streaming; private VPC mode needs NAT or egress for Cognito token exchange.
  • The gateway does not inspect content; backend agents must handle prompt injection defenses themselves.

The same at other vendors