Building Secure AI Agents with OpenClaw on AWS
Published by O'Reilly Media, Inc.
Deploy, Customize, and Harden AI Agents on AWS
Course Outcomes
- Deploy OpenClaw on Amazon Lightsail with Amazon Bedrock, configuring the instance, pairing your browser, enabling AI capabilities, and connecting a messaging channel
- Build custom OpenClaw skills using the SKILL.md format, including tool declarations, script integration, and ClawHub publishing
- Design persistent memory systems using SOUL.md, HEARTBEAT.md, and the memory folder to create agents that learn and adapt across sessions
- Implement security hardening using IAM least-privilege policies, Docker sandboxing, gateway token rotation, and third-party skill auditing to protect against prompt injection, data exfiltration, and malicious skills
Course description
OpenClaw is the fastest-growing open source AI agent framework on GitHub, with over 145,000 stars and a skills ecosystem of over 13,000 community-built extensions. OpenClaw turns LLMs into persistent, messaging-first agents that can browse the web, manage your calendar, execute code, send emails, and automate workflows on your behalf. AWS recently launched OpenClaw as a preconfigured blueprint on Amazon Lightsail with Amazon Bedrock as the default AI provider, making cloud deployment faster than ever. The opportunity is enormous; the risk surface is equally large.
Most OpenClaw tutorials stop at installation. This course goes further. You’ll deploy OpenClaw on Amazon Lightsail, configure Amazon Bedrock as your LLM backend, build custom skills from scratch, set up persistent memory, connect messaging platforms, and harden the entire system using IAM policies, Docker sandboxing, and gateway security controls. You’ll leave with a running cloud-hosted, secured OpenClaw agent, three custom skills you built during the session, and a production security checklist you can apply to any agent deployment on AWS.
This live event is for you because...
- You’re a developer who wants to deploy OpenClaw on AWS and move beyond basic setup into custom skills, memory, and production-grade configuration.
- You’re an AI/ML engineer evaluating OpenClaw as an agent framework and want to understand how it integrates with Amazon Bedrock and the AWS ecosystem.
- You’re a cloud or DevOps engineer who’s responsible for hosting and securing AI agent infrastructure on AWS.
- You want to build and publish custom OpenClaw skills and contribute to the ClawHub ecosystem.
Prerequisites
- An AWS account. If you don't have one, create a free tier account at https://aws.amazon.com/free/webapps. Note: this course cannot use the O'Reilly Sandbox environment.
- Amazon Bedrock model access enabled for Anthropic models. Anthropic models require a one-time use case submission per AWS account before they can be enabled. Submit the form via the Amazon Bedrock Console under Model Catalog. Details: https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html
- A Telegram account (recommended for the messaging integration exercises)
- Comfort working in a terminal (bash, SSH, basic filesystem navigation)
- Basic familiarity with AWS (console navigation, IAM concepts, launching instances)
- An understanding of LLM concepts (prompts, completions, tokens)
- No prior OpenClaw experience required
Recommended preparation:
- Look for starter configurations, custom skill templates, and IAM policy templates distributed via a GitHub repository shared before the session
Course Follow-Up:
- Take MCP Bootcamp: Building AI Agents with Model Context Protocol (live online course with Lucas Soares)
- Read Building Integrated AI Agents with OpenClaw (live online training course)
- Explore Building AI Agents with LangGraph: Creating Agentic Applications with Large Language Models and LangGraph (on-demand course)
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
OpenClaw architecture and AWS deployment (35 minutes)
- Presentation: What OpenClaw actually is—a prompt builder with a message router; the brain, hands, memory mental model; how OpenClaw connects to LLMs (Bedrock, direct API, local models via Ollama); the gateway architecture and how messaging platforms plug in; why the Lightsail blueprint changes the deployment story
- Hands-on exercises: Launch an OpenClaw instance on Lightsail using the preconfigured blueprint; connect via SSH, copy the gateway token, and pair your browser; run the CloudShell script to enable Bedrock API access; send your first message via the Control UI and observe the agent’s decision flow powered by Bedrock
- Q&A
- Break
Configuration and messaging integration (40 minutes)
- Presentation: SOUL.md (defining who your agent is and how it behaves); configuration anatomy (openclaw.json, tools.allow, and skills.allowBundled); connecting to messaging platforms (Telegram, WhatsApp, Discord); the difference between tools and skills and why that distinction matters for both functionality and security
- Hands-on exercises: Write a SOUL.md that defines your agent’s personality, boundaries, and behavioral rules; configure tools.allow to control what the agent can actually do on the Lightsail instance; connect your agent to Telegram and have a conversation with it from your phone
- Q&A
- Break
Building custom skills (60 minutes)
- Presentation: Skill architecture (SKILL.md frontmatter, body instructions, and supporting scripts); how the three-layer loading system works (frontmatter screening, body loading, script execution); skill precedence (workspace versus local versus bundled; tool declarations and when skills need exec, read, write, or web access; publishing to ClawHub
- Hands-on exercises: Build three custom skills from scratch on your Lightsail instance—a project scaffolder skill that creates directory structures with starter files from a project description, a file organizer skill that sorts downloads by type and date, and a code review skill that analyzes a GitHub PR and flags issues; test each skill via natural language and manual invocation; observe how the agent selects and loads skills at runtime
- Q&A
- Break
Sessions, Memory & Proactive Behavior (45 minutes)
- Presentation: How OpenClaw tracks conversations through sessions, including session keys, DM scoping, and transcript storage; how compaction works; how the memory system works with MEMORY.md for long-term recall, daily diary entries for running context, and the builtin SQLite-backed search engine; HEARTBEAT.md and scheduled tasks with the cron tool; building agents that act proactively without waiting for a prompt; persistence considerations on Lightsail
- Hands-on exercises: Explore session state and memory files on your Lightsail instance; tell your agent something memorable and watch it write to memory; set up a HEARTBEAT.md with a scheduled monitoring task; restart the agent and verify it retains context across restarts; inspect session transcripts and memory files on disk via SSH
- Q&A
- Break
Security hardening on AWS (45 minutes)
- Presentation: The real threat model (prompt injection, malicious skills on ClawHub, data exfiltration, and over-permissioned agents); Docker sandboxing for isolating agent execution; why AWS matters for agent security: Bedrock Guardrails for content filtering and PII redaction on every API call, IAM least-privilege for model access, CloudTrail auditing of every Bedrock invocation, and traffic that never leaves the AWS network
- Hands-on exercise: Patch the OS, restrict the Lightsail firewall to specific IPs, and run openclaw security audit to fix file permission issues; customize the IAM policy to enforce least-privilege Bedrock access for a single model; create a Bedrock Guardrail with content filters; walk through the production security checklist Let me know if you need anything else.
- Q&A
Wrap-up and Q&A (15 minutes)
Your Instructor
Kesha Williams
Kesha Williams is an enterprise architect and AI consultant with over three decades of experience designing, building, and operating production software systems. She’s the founder and managing partner of Keysoft, where she helps organizations safely adopt and operationalize AI, including autonomous agent systems. An AWS AI Hero, Kesha focuses on helping engineering and security teams deploy AI safely by applying practical architectural and operational patterns. She brings a practitioner’s perspective shaped by experience working directly with teams deploying agent-based systems in production. Kesha is also an AI educator and advisor, as well as a frequent speaker at global technology conferences.
Skills covered
- AI Agents
- Generative AI