Building a serverless A2A gateway for agent discovery, routing, and access control
Machine Learning Blog
This article describes how to build a serverless Agent-to-Agent (A2A) gateway on AWS that centralizes agent discovery, routing, and access control across distributed AI agents.
- Gateway provides single entry point for agents running on ECS, Lambda, Bedrock, or hybrid environments using path-based routing
- Three-layer architecture: management layer with agent registry and semantic search, control layer with JWT-based access control, execution layer with OAuth authentication and SSE streaming
- Lambda authorizer validates JWTs and generates IAM policies; DynamoDB stores agent registry, permissions, and rate limit counters
- Supports A2A protocol specification with JSON-RPC and HTTP+JSON/REST bindings for agent communication
- Terraform deployment includes Cognito OAuth, Secrets Manager for credentials, and optional private VPC mode for secure infrastructure
- Includes example Weather and Calculator agents; demonstrates agent registration, permission management, and message routing through gateway
The gateway eliminates point-to-point agent connections, centralizes access control, and enables semantic discovery, reducing operational complexity as agent deployments scale.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
May 26
2026
2026
Build highly scalable serverless LangGraph multi-agent systems in AWS with Amazon Bedrock AgentCore
Jun 1
2026
2026
Secure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway
Aug 14
2025
2025
Effectively building AI agents on AWS Serverless
Jan 26
2026
2026
Build a serverless AI Gateway architecture with AWS AppSync Events
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.