AWS Builder Center
What I Learned from the OpenClaw on AWS Workshop: From EC2 to Multi-Tenant AI Agents

What I Learned from the OpenClaw on AWS Workshop: From EC2 to Multi-Tenant AI Agents

A technical deep dive into what I learned from the OpenClaw on AWS workshop, exploring agent deployment on EC2, Amazon Bedrock AgentCore, Kubernetes Agent Sandbox, the OpenClaw Kubernetes Operator, and multi-tenant AI agent architectures on Amazon EKS.

Recently, I attended the OpenClaw on AWS Workshop organized by AWS User Groups Hyderabad.
The session was much more than a demonstration of an AI agent. What interested me most was seeing how an autonomous agent can evolve from a simple deployment on a single EC2 instance into a secure, isolated, and multi-tenant platform on Amazon EKS.
During and after the workshop, I explored six resources that helped me connect the workshop concepts to actual implementations:
  • Running OpenClaw on Amazon EC2
  • Hosting OpenClaw on Amazon Bedrock AgentCore
  • Kubernetes Agent Sandbox
  • OpenClaw Kubernetes Operator
  • OpenClaw Multi-Tenant Platform on Amazon EKS
  • The accompanying OpenClaw demo
This article focuses on what I learned from the workshop and how these pieces fit together.
Photograph of the OpenClaw with AWS workshop presentation showing instructions for joining the hands-on workshop.


1. OpenClaw: More Than an LLM Application

My biggest takeaway from the workshop was that an AI agent is fundamentally different from an application that simply sends a prompt to an LLM.
A basic LLM application can be thought of as:
User
↓
Application
↓
LLM
↓
Response

An autonomous agent is closer to:
User
↓
Agent
├── LLM
├── Tools
├── Skills
├── Memory
├── Files
└── External services

The moment an agent can interact with files, execute tools, access websites, maintain state, or perform actions on behalf of a user, infrastructure and security become part of the AI architecture.
That is what made the AWS deployment options particularly interesting to me.
The workshop presented OpenClaw as a layered architecture, with the LLM abstraction at the bottom and the gateway at the top:
THE OPENCLAW ARCHITECTURE

L4 — OpenClaw Gateway
│
├── Channels
├── Memory
├── Cron
├── Session
├── Sandbox
└── Voice
│
└── L3 — Pi-Coding-Agent
│
├── Session Manager
├── AuthStorage
├── Skills
└── Extensions
│
└── L2 — Pi-Agent-core
│
├── Agent Loop
├── Steering
├── Follow-ups
├── LLM ↔ Tools
│
└── L1 — Pi-AI LLM Abstraction Layer
│
├── streamSimple() / completeSimple()
├── Unified streaming interface
└── 2000+ models across providers
Anthropic · OpenAI · Google · Bedrock
Mistral · Groq · XAI · Ollama · OpenRouter

2. Starting Simple: OpenClaw on Amazon EC2

The simplest deployment I explored was running OpenClaw on Amazon EC2.
The basic idea is straightforward:
User
↓
Messaging / Web Interface
↓
OpenClaw
↓
Amazon EC2
↓
AI Model + Tools

Running the agent on EC2 gives it a dedicated cloud environment instead of placing its execution environment directly on a personal machine.
That provides a useful starting point for:
  • Persistent compute
  • OS-level control
  • Dedicated storage
  • AWS networking and security controls
  • 24/7 availability
But the trade-off is equally important: with EC2, you manage the infrastructure.
That means taking responsibility for operating-system updates, security groups, IAM, storage, monitoring, backups, availability, and scaling.
For a single agent or an experimental deployment, that can be a reasonable trade-off. As the number of users and agents grows, however, infrastructure management becomes a much bigger part of the problem.
Photo from the AWS User Groups Hyderabad OpenClaw on AWS workshop showing the presentation screen during the session.


3. Moving to Amazon Bedrock AgentCore

The next architecture was particularly interesting to me: hosting OpenClaw on Amazon Bedrock AgentCore Runtime.
The sample demonstrates a managed approach where OpenClaw runs in isolated per-user runtime environments.
A simplified view is:
Telegram / Slack
↓
API Gateway
↓
Router Lambda
↓
AgentCore Runtime
↓
Amazon Bedrock

The important architectural idea is per-user isolation. The sample uses Firecracker-based microVM isolation so that each user's runtime is separated from the others.
That is a major shift from simply running many users inside one shared application process.

4. Ephemeral Compute, Persistent State

One of the concepts I found most useful was the separation between compute lifecycle and state lifecycle.
An agent runtime can be ephemeral, but the agent still needs to retain information such as:
  • Conversation history
  • User preferences
  • Agent configuration
  • Workspace files
  • Skills
  • Other persistent state
The AWS AgentCore sample uses the OpenClaw  .openclaw/  workspace together with Amazon S3 so the workspace can be persisted and restored when a runtime is recreated.
Conceptually:
AgentCore Runtime
│
│ Workspace
▼
Amazon S3
Persistent State
The pattern I took away from this is simple:
Compute can be ephemeral while state remains persistent.
That is useful well beyond OpenClaw. It is a general pattern for building scalable stateful agent systems.
Workshop presentation slide describing OpenClaw running on Amazon Bedrock AgentCore, including the serverless agent runtime, AgentCore Runtime, and AgentCore Memory.


5. Separating the Agent Runtime from the Model

Another useful architectural distinction is between the agent runtime and the model layer.
OpenClaw does not need to be responsible for hosting the underlying foundation model. Instead, the architecture can separate the two:
OpenClaw
↓
AgentCore Runtime
↓
Amazon Bedrock
↓
Foundation Model

The agent runtime can focus on things such as:
  • Planning and execution
  • Tool use
  • Skills
  • Memory
  • Interaction
while Amazon Bedrock provides the model layer.
The AgentCore sample also demonstrates additional controls around authentication, credentials, networking, and Bedrock Guardrails. This reinforced an important point for me: model access, agent execution, and security controls should be treated as separate architectural concerns.

6. Why AI Agents Need a Different Kubernetes Abstraction

The next question I found myself asking was:
What happens when we want to run many agents ourselves on Kubernetes?
This is where the  Kubernetes Agent Sandbox  project becomes relevant.
Kubernetes is excellent at managing traditional cloud-native workloads, but an AI agent can have a different lifecycle.
An agent may be:
  • Stateful
  • Long-running
  • Single-instance
  • Persistent
  • User-specific
  • Network-accessible
  • Executing potentially untrusted generated code
Agent Sandbox introduces a Kubernetes  Sandbox  abstraction for isolated, stateful, singleton workloads, including AI agent runtimes.
That makes the abstraction much closer to the actual lifecycle of an agent than treating every agent as an ordinary stateless deployment.
Workshop presentation slide describing OpenClaw deployment on Amazon EKS using Agent Sandbox and a Kubernetes operator.


7. The Agent Sandbox Model

Instead of manually assembling multiple Kubernetes resources for every agent, the Sandbox abstraction provides a higher-level primitive.
The project also includes concepts such as:
  •  SandboxTemplate 
  •  SandboxClaim 
  •  SandboxWarmPool 
These help when provisioning and managing larger numbers of isolated agent environments.
The key idea I took away was:
An AI agent is not always a stateless Pod.
An agent may need a stable identity, persistent storage, a predictable lifecycle, and controlled isolation.
That is where the Sandbox abstraction becomes particularly useful.

8. Container Isolation vs Stronger Runtime Isolation

Another important distinction is that Kubernetes itself does not automatically provide the strongest possible isolation for every workload.
Agent Sandbox can integrate with different sandbox runtimes and Kubernetes  RuntimeClass  configurations, allowing stronger isolation mechanisms such as gVisor or Kata Containers where appropriate.
Conceptually:
Kubernetes
↓
Agent Sandbox
↓
RuntimeClass
↓
Sandboxed Runtime
↓
Agent Workload

This becomes especially important for agent workloads that execute generated code or commands.
The more freedom an agent has to act, the more important the execution boundary becomes.

9. OpenClaw Kubernetes Operator

The next project I explored was the  OpenClaw Kubernetes Operator .
A Kubernetes Operator lets deployment and lifecycle management be expressed declaratively.
Instead of manually creating and managing many resources for every OpenClaw instance, an OpenClaw-specific resource can describe the desired state and the operator can reconcile the underlying Kubernetes resources.
Conceptually:
OpenClaw Instance
↓
Kubernetes Operator
↓
Kubernetes Resources
• Workload
• Service
• Storage
• RBAC
• NetworkPolicy
• Configuration
This is the same declarative approach that makes Kubernetes powerful for traditional cloud-native infrastructure, but applied to an AI-agent workload.

10. Declarative Infrastructure for AI Agents

This changes how I think about agent deployment.
Instead of manually performing a series of infrastructure steps:
"Create a container, attach storage, configure networking, create permissions and expose it."
we can describe the desired agent state:
"I want an OpenClaw instance with these properties."
The operator handles the underlying Kubernetes resources needed to achieve that state.
The abstraction becomes:
OpenClaw Agent → Kubernetes resource
rather than:
OpenClaw Agent → manually assembled collection of Kubernetes resources
This is especially useful when many agents need to be created, updated, monitored, and removed consistently.

11. The Multi-Tenant Problem

The biggest architectural jump comes when we move from:
One user → One agent
to:
Hundreds of users → Hundreds of agents
This is where the  AWS OpenClaw Multi-Tenant Platform on Amazon EKS  becomes especially relevant.
The project demonstrates an architecture where users receive isolated AI workspaces powered by Amazon Bedrock.
A simplified view is:
Internet
↓
Amazon CloudFront
↓
ALB + AWS WAF
↓
Amazon EKS
↓
Tenant A → OpenClaw ┐
Tenant B → OpenClaw ├→ Amazon Bedrock
Tenant C → OpenClaw ┘
This is where the architecture starts looking less like a single AI assistant and more like a platform for hosting many isolated AI assistants.

12. One Tenant, One Isolated Workspace

The multi-tenant platform applies multiple layers of isolation around each tenant.
A tenant can have its own:
  • Kubernetes namespace
  • Persistent storage
  • Network policy
  • IAM role
  • Service account
  • OpenClaw workload
So instead of putting every user inside one shared OpenClaw instance, the platform moves toward:
EKS Cluster
├── Tenant A
│ └── OpenClaw A
│
├── Tenant B
│ └── OpenClaw B
│
└── Tenant C
└── OpenClaw C

This is important because multi-tenancy is not simply about running multiple containers. It requires thinking about identity, networking, storage, permissions, routing, and isolation together.

13. Using EKS Pod Identity Instead of Embedding Credentials

One detail I particularly liked was the use of EKS Pod Identity for workloads accessing Amazon Bedrock.
Conceptually:
OpenClaw Pod
↓
EKS Pod Identity
↓
IAM Role
↓
Amazon Bedrock

The workload receives AWS permissions through its runtime identity instead of storing long-lived AWS credentials inside the application.
This reinforces a principle I want to carry into future cloud projects:
Identity should come from the workload's environment wherever possible, rather than from credentials embedded inside the application.

14. Scale-to-Zero for AI Agents

Running hundreds of agents continuously would be expensive if every tenant kept a Pod running 24/7.
The multi-tenant sample uses KEDA to scale idle tenant workloads down to zero in its default Deployment-based mode.
Conceptually:
100 registered users
↓
20 active users
↓
20 running workloads

The remaining workloads can scale down while idle and start again when needed.
The important trade-off is cold-start latency. The sample describes roughly 15–30 seconds for the default tenant mode when scaling from zero.
So the trade-off becomes:
Lower cost ↔ Higher startup latency
This is a familiar cloud optimization problem, but it becomes especially interesting for stateful AI agents.

15. Where Agent Sandbox Fits into Multi-Tenancy

One connection I found particularly interesting while exploring the projects after the workshop is the relationship between the multi-tenant platform and Agent Sandbox.
The multi-tenant platform includes an ADR discussing adoption of the Agent Sandbox model for tenant workspace isolation.
A tenant's OpenClaw environment is naturally:
  • Long-running
  • Stateful
  • Singleton
  • Persistent
  • User-specific
That maps well to the Agent Sandbox abstraction.
Conceptually:
Tenant
↓
Agent Sandbox
↓
OpenClaw
├── Workspace
├── Tools
├── Skills
└── Memory

This provides a useful way to think about tenant isolation as an explicit workload primitive rather than something assembled indirectly from unrelated Kubernetes resources.
Workshop presentation showing a multi-tenant AI assistant architecture on Amazon EKS with CloudFront, WAF, Cognito, tenant pods, EFS, KEDA, ArgoCD, and Amazon Bedrock.


16. Security Is the Real Challenge

This was probably the most important lesson from the workshop.
An autonomous agent is not just another web application.
Depending on how it is configured, it may interact with:
  • Files
  • Shell commands
  • Websites
  • APIs
  • Credentials
  • Messaging platforms
  • Cloud resources
  • External services
That creates a much larger attack surface than a normal conversational application.
The workshop highlighted five major threats:

1. Prompt Injection

An attacker attempts to manipulate the agent through malicious instructions.

2. Skill Supply-Chain Attacks

A malicious or compromised skill can introduce unwanted behavior into the agent.

3. Runtime and Code Vulnerabilities

Vulnerabilities in the runtime or installed components can become an entry point.

4. Credential Leakage

Improperly scoped credentials can expose AWS resources or external services.

5. Data Exfiltration

A compromised or manipulated agent may attempt to send sensitive information outside its intended environment.
Workshop presentation slide describing five critical OpenClaw security threats: prompt injection, skill supply-chain attacks, runtime vulnerabilities, credential leakage, and data exfiltration.


17. Security Has to Be Layered

One of my strongest takeaways was that there is no single control that makes an autonomous agent safe.
Security needs to be layered around the agent.
A simplified model is:
Internet
↓
CloudFront
↓
AWS WAF
↓
Load Balancer
↓
Kubernetes Network Controls
↓
Tenant Namespace
↓
Pod Identity / IAM
↓
Sandbox / Runtime Isolation
↓
OpenClaw
↓
Agent Tools

Each layer addresses a different class of risk.
This is what I found most different from thinking about a normal LLM application: the agent itself becomes part of the security boundary.
The more capabilities an agent receives, the more carefully those capabilities have to be scoped.

18. Putting Everything Together

After going through these projects, I found it useful to think about the deployment journey as an evolution:
OpenClaw
↓
EC2 → Self-managed
or
AgentCore → Managed runtime
↓
Kubernetes
↓
Agent Sandbox + K8s Operator
↓
Amazon EKS
↓
Multi-tenancy
↓
Tenant A · Tenant B · Tenant C
↓
Amazon Bedrock
Each stage solves a different problem:
Approach
Main problem being addressed
EC2
Dedicated, persistent compute
Bedrock AgentCore
Managed and isolated agent runtime
Agent Sandbox
Stateful agent lifecycle and isolation
Kubernetes Operator
Declarative OpenClaw management
EKS multi-tenancy
Isolation and operation across many users

19. What Changed in My Mental Model of AI Agents

Before the workshop, I mostly thought about AI agents from the perspective of:
Model + Prompt + Tools
After exploring these architectures, my mental model has changed to:
AI Agent
│
├── LLM
├── Tools
├── Memory
├── Identity
├── Sandbox
├── Persistence
├── Orchestration
├── Networking
└── Security
The intelligence of an agent is only one part of the system.
Once the agent can act, the infrastructure around it becomes just as important as the model itself.

Final Thoughts

What I liked most about this workshop was that it connected several areas that are often discussed separately:
Generative AI + AWS + Kubernetes + Cloud Security + Multi-Tenancy
The progression from a simple OpenClaw deployment on EC2 to isolated runtimes on AgentCore and eventually multi-tenant environments on EKS gave me a much clearer picture of how AI-agent infrastructure can evolve.
The question is no longer only:
"How do I build an AI agent?"
It becomes:
"How do I give an AI agent enough capability to be useful while giving it only enough access to remain safe?"
That is the part of agent engineering I found most interesting from this workshop.
Workshop presentation slide summarizing OpenClaw security and deployment guidance: use isolated environments, enforce gateway-based access, treat skills and inputs as untrusted, and build security into the architecture.


Resources

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