<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bo Bo Han</title>
    <description>The latest articles on DEV Community by Bo Bo Han (@bobohan777).</description>
    <link>https://dev.to/bobohan777</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1360745%2F1fc32d4e-fade-4b2c-a509-45f995ef1ff9.jpeg</url>
      <title>DEV Community: Bo Bo Han</title>
      <link>https://dev.to/bobohan777</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bobohan777"/>
    <language>en</language>
    <item>
      <title>Autonomous AWS SysAdmin Agent (AI/MCP)</title>
      <dc:creator>Bo Bo Han</dc:creator>
      <pubDate>Thu, 19 Mar 2026 05:43:32 +0000</pubDate>
      <link>https://dev.to/bobohan777/autonomous-aws-sysadmin-agent-aimcp-2de8</link>
      <guid>https://dev.to/bobohan777/autonomous-aws-sysadmin-agent-aimcp-2de8</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29v487lqafgsfbzbb1vm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29v487lqafgsfbzbb1vm.png" alt=" " width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The 3 AM Wake-Up Call&lt;/strong&gt;&lt;br&gt;
We’ve all been there. It’s 3:14 AM. PagerDuty screams. You open your laptop, squinting at the brightness, and ssh into a server. You run htop. You run tail -f /var/log/syslog. You realize the disk is full because a log rotation script failed. You run rm -rf /tmp/junk. You go back to sleep.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why are we still doing this in 2026?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For the last decade, “DevOps” meant writing scripts to automate these tasks. But scripts are fragile. They follow rules: “If disk &amp;gt; 90%, delete folder X.” But what if the problem is folder Y? The script fails. The human wakes up.&lt;/p&gt;

&lt;p&gt;I decided I was done writing rules. I wanted to build a system that understands Context.&lt;/p&gt;

&lt;p&gt;Enter “Agentic” Infrastructure&lt;br&gt;
I spent the last two weeks building the AWS SysAdmin MCP Agent.&lt;/p&gt;

&lt;p&gt;It is not a script. It is an AI application running on AWS Fargate that acts as a Level 3 Autonomous Operator. It uses the Model Context Protocol (MCP) — the new standard for connecting LLMs to tools — to safely control my infrastructure.&lt;/p&gt;

&lt;p&gt;Here is why this changes everything.&lt;/p&gt;

&lt;p&gt;The Problem with “Chatbots” in Ops&lt;br&gt;
Most people use ChatGPT for coding. They copy-paste an error log, get a fix, and paste it back into the terminal. This is Level 1 Automation. It’s still manual.&lt;/p&gt;

&lt;p&gt;To get to Level 3 (Autonomy), the AI needs “Hands.” It needs to be able to:&lt;/p&gt;

&lt;p&gt;See: Read logs directly.&lt;br&gt;
Think: Analyze the root cause.&lt;br&gt;
Act: Execute the fix.&lt;br&gt;
But giving an AI sudo access terrifies every Security Engineer on the planet (including me).&lt;/p&gt;

&lt;p&gt;The Architecture: “The Secure Cell”&lt;br&gt;
To solve the security problem, I didn’t give the AI my keys. I built a Control Plane.&lt;/p&gt;

&lt;p&gt;The Stack:&lt;/p&gt;

&lt;p&gt;The Brain (Any LLM): Claude 3.5 Sonnet or Gemini Pro. It runs outside the infrastructure. It has no credentials.&lt;br&gt;
The Body (MCP Server): A Docker container running on AWS Fargate in a private subnet.&lt;br&gt;
The Hands (Tools): Python functions (read_log, restart_service, check_disk) exposed via MCP.&lt;br&gt;
The Guardrails (AWS Secrets Manager): The ssh keys to my target servers are locked in Secrets Manager. The AI never sees them. It just asks the Agent: “Please run command X on Server Y.” The Agent authenticates and executes using the stored key.&lt;br&gt;
Real-World Scenario: “The Nginx Crash”&lt;br&gt;
Here is what happens when a server fails now:&lt;/p&gt;

&lt;p&gt;Trigger: I ask the Agent: “Why is the web server returning 500 errors?”&lt;br&gt;
Diagnosis: The Agent doesn’t guess. It calls read_log_file(path='/var/log/nginx/error.log').&lt;br&gt;
Reasoning: Only the AI reads the messy log lines: [error] 23#23: *1201 worker_connections are not enough.&lt;br&gt;
Action: The AI understands this is a config limit. It proposes: “I need to increase worker_connections in nginx.conf execute_command('sed -i ...') and restart."&lt;br&gt;
Execution: I approve (or set it to auto-approve). The Agent fixes it.&lt;br&gt;
Total time: 45 seconds.&lt;br&gt;
Human effort: 0 mental load.&lt;/p&gt;

&lt;p&gt;Why “MCP” Matters&lt;br&gt;
Before MCP, building this required complex, brittle API wrappers for every single tool. With Model Context Protocol, the “Brain” and the “Tools” are decoupled. I can swap Claude for Gemini, or Fargate for local Docker, and the protocol remains the same. It is the USB-C for AI.&lt;/p&gt;

&lt;p&gt;Conclusion: The End of “If-Then-Else”&lt;br&gt;
We are moving from “Imperative Ops” (telling the computer exactly what to do) to “Declarative Intent” (telling the computer what we want fixed).&lt;/p&gt;

&lt;p&gt;My Bash scripts were great. They served me well. But they can’t read. They can’t think. It’s time to let them retire.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>architecture</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
