AWS Builder Center
Building a Serverless Multi-Agent Robotics Platform on AWS: Lessons from AWS Community Day Shenzhen

Building a Serverless Multi-Agent Robotics Platform on AWS: Lessons from AWS Community Day Shenzhen

A hands-on guide from AWS Community Day on building cost-effective, serverless multi-agent robotics using Bedrock AgentCore, DynamoDB session state, and AWS IoT.

AWS AI Hero + Microsoft MVP + Google Developer Experts - GCP(AI)




1. Bridging Communities: The AWS Community Day Experience

AWS Community Day Shenzhen brought together builders, cloud architects, and AI enthusiasts across the Greater Bay Area under the theme "Bridge with Signal." [ 00:11 ] As an AWS sponsored traveler and speaker, sharing real-world experiments with the community highlighted how rapidly open-source generative AI and agentic workflows are evolving—moving beyond simple chat prompts into physical embodiment and multi-agent coordination.
The talk centered on how to run OpenClaw—an open multi-agent framework orchestrating physical humanoid robots, game commentators, and digital humans—completely serverless on AWS using Amazon Bedrock AgentCore Runtime and MicroVMs, keeping idle costs practically at zero [ 00:18 ].



2. The Core Problem: The High Cost of Always-On Agents

Most existing multi-agent implementations assume persistent compute: long-running EC2 instances or ECS/EKS containers. However, hosting AI agents on persistent infrastructure presents significant challenges:
  1. Idle Infrastructure Costs: Traditional container tasks (e.g., AWS Fargate) or virtual machines charge for 24/7 compute even when the agent is waiting between prompts or user interactions [ 20:16 ].
  1. State and File Concurrency: Agent frameworks often write state locally to flat files or memory contexts. In multi-server or clustered architectures, shared access to common files (like memory logs) requires complex networked file systems (EFS) or introduces file-locking bottlenecks [ 14:18 ].
  1. Expensive Network Overheads: Official reference architectures frequently place agents in private VPCs requiring dedicated NAT Gateways and VPC Endpoints, which incur fixed hourly fees regardless of usage [ 14:58 ].
To solve this, the architecture combines Amazon Bedrock AgentCore Runtime (MicroVMs) with an event-driven AWS serverless stack [ 13:44 ].

3. High-Level Architecture & Technical Implementation

Plaintext
Plain text
[User / Webhook] ──> [API Gateway] ──> [AWS Lambda]
│
┌──────────────────┴──────────────────┐
▼ ▼
[Amazon DynamoDB] [Bedrock AgentCore]
(Session State & Tracking) (Serverless MicroVMs)
│
┌───────────────────────┴───────────────────────┐
▼ ▼
[LLM Providers] [AWS IoT Core & Lambda]
(Amazon Bedrock / Kimi / Nova) (Embodied Humanoid Robots)

A. Serverless Agent Hosting: AgentCore Runtime & MicroVMs

Instead of paying by the wall-clock hour for long-running containers, AgentCore leverages isolated microVM sandboxes [ 20:06 ]. Compute is metered strictly by requests and active execution time [ 20:29 ]. An orchestrator AWS Lambda function handles request lifecycle management and routes incoming user messages or events directly into the designated agent session [ 21:04 ].

B. Drastic Cost Optimization: Eliminating NAT Gateway

In typical VPC configurations, private compute subnets need a NAT Gateway to access external model endpoints and internet APIs, accruing unnecessary fixed charges [ 15:04 ]. By restructuring the networking into tightly scoped subnets governed by specific AWS Security Groups and Network Access Control Lists (NACLs), the architecture eliminates NAT Gateway dependencies while keeping compute isolated and secure [ 15:13 ]. When no requests are dispatched, total infrastructure operating cost drops to near zero [ 15:18 ].

C. Session State Persistence with Amazon DynamoDB

Because AgentCore microVMs scale up on demand, maintaining conversation state and context continuity is vital. Requests pass through API Gateway and Lambda to check existing active sessions tracked in Amazon DynamoDB [ 21:57 ]. Reusing active session contexts drastically cuts down initialization overhead ("cold starts") and prevents re-reading hefty memory indexes on every turn [ 24:59 ].

D. Physical Robot Orchestration via AWS IoT Core

Each humanoid robot is registered as a thing in AWS IoT Core [ 16:57 ]. Rather than sending raw, low-level actuator signals across the internet, the agent uses structured MCP tools and skills:
  • Physical Motions: The agent selects skills (e.g., walk, jump, bow, gesture) via Python CLI tools, triggering Lambda functions and MQTT topics down to the robot’s onboard controller [ 17:59 ].
  • Speech Output: The agent issues speech commands to an Amazon Polly pipeline. Polly synthesizes speech audio, deposits the MP3 file into Amazon S3, and hands back a pre-signed S3 URL for the physical robot to stream and speak [ 18:29 ].
  • Computer Vision: When the agent needs visual inspection, it requests a snapshot via IoT Core. The robot's camera captures an image, uploads it directly to an Amazon S3 bucket via a pre-signed URL, and passes the asset back into the multi-modal agent loop [ 19:19 ].

4. Key Engineering Lessons Learned

Challenge
Root Cause
Solution
MicroVM Lifecycle
Early AgentCore iterations held Elastic Network Interfaces (ENIs) during teardown, causing multi-hour deletion delays [
 16:10 
].
Recent AWS updates resolved ENI retention issues; deployments now clean up instantly [
 16:20 
].
Agent Infinite Delegation
Autonomous sub-agents could cross-delegate tasks in loops without completing them [
 26:00 
].
Defined explicit  allowAgents  delegation policies to strictly gate which sub-agents can issue actuator or external communication commands [
 24:01 
].
"Double Talking"
Multiple embodied agents processing independent triggers simultaneously resulted in overlapping voice audio [
 25:19 
].
Implemented turn-taking locks and sequential speaking queues within the central session manager [
 25:32 
].
Reproducibility
Manual console configuration of Bedrock AgentCore, DynamoDB, API Gateways, and IoT policies is error-prone [
 27:41 
].
Encapsulated all cloud resources and local device skills into AWS CDK for automated, immutable deployments [
 27:34 
].

5. Summary & Community Impact

Embodied AI does not require dedicated clusters or hefty server bills. By combining Amazon Bedrock AgentCore, AWS Lambda, Amazon DynamoDB, and AWS IoT Core, developers can orchestrate interactive, physical agent systems with cloud-native reliability and pay-per-use economics [ 27:27 ].
Events like AWS Community Day Shenzhen demonstrate how hands-on community experimentation uncovers production-grade architectural patterns. If you are exploring autonomous agents or serverless architectures on AWS, consider packaging your environments with AWS CDK and trying serverless microVM sandboxes for your next deployment!



Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article