
Building an Intelligent AWS Cloud Engineer Agent with Strands Agents SDK
AI-powered AWS Cloud Engineer: MCP tools, diagram generation, AWS CLI access in one agent, and CDK-based AWS Fargate deployment
Published May 19, 2025
In today’s cloud-first world, managing AWS infrastructure efficiently requires deep expertise and constant attention. What if you could have an AI assistant that understands AWS services, can monitor your resources, optimize costs, and even generate architecture diagrams on demand? That’s exactly what I’ve built with the AWS Cloud Engineer Agent.
The AWS Cloud Engineer Agent is an intelligent assistant that helps developers and cloud engineers manage their AWS infrastructure more efficiently. Built using the powerful Strands Agents SDK, this agent combines the reasoning capabilities of large language models with direct access to AWS services, documentation, and diagramming tools using MCP (Model Context Protocol).
Unlike traditional chatbots that simply respond to queries, the AWS Cloud Engineer Agent can:
- Monitor and analyze AWS resources across multiple services
- Identify security vulnerabilities and recommend best practices
- Find cost-saving opportunities in your infrastructure
- Generate AWS architecture diagrams from text descriptions (AWS MCP tool)
- Search AWS documentation for relevant information (AWS MCP tool)
- Execute AWS CLI commands directly through its interface
At the heart of our AWS Cloud Engineer Agent is the Strands Agents SDK, a revolutionary framework for building AI agents with a model-first approach. But what exactly does “model-first” mean?
Traditional agent frameworks (LangChain, etc) often rely on hardcoded workflows and decision trees, where developers must explicitly define every possible path and action. In contrast, Strands Agents SDK puts the language model in the driver’s seat.
For builders looking for an open source offering with more control and flexibility, Strands Agents is ready to go! Here are several compelling reasons to choose Strands Agents SDK for your next AI project:
- Clean simple Python interface — Create your first agent with just a few lines of code
- MCP integration out of the box — Immediate access to the best tools the agent world has to offer
- Add custom tools with a simple decorator on local functions
- Model choice on steroids — With models from Bedrock, LiteLLM, Anthropic, Meta, even bring-your-own provider (proprietary gateway? no problem for Strands)
- Powerful set of examples to get you moving fast (multi agents, agent swarm, MCP, AWS deployments, guardrails, and much more)
- Out-of-the-box support for OTEL observability — Letting you know exactly what your agent is doing and why, plus hooks to agent evaluations to help you iteratively optimize agent accuracy and latency
- Solid documentation to help you get started
Strands Agents SDK implements what’s called an “agentic loop” architecture:
- The agent receives a user request (e.g., “Find unattached EBS volumes that could be removed”)
- The LLM analyzes the request and determines the best approach (e.g., “I need to list all EBS volumes and check their attachment status”)
- The agent executes the appropriate tools as directed by the LLM (e.g., running AWS CLI commands)
- Results are fed back to the LLM for further analysis
- The process repeats until the task is complete
This architecture enables sophisticated reasoning and multi-step problem solving without requiring developers to anticipate every possible scenario. The LLM acts as the orchestrator, making decisions about which tools to use and when.
Here’s a simple code snippet showing how easy it is to create an agent with Strands:
With just a few lines of code, we’ve created an agent that can interact with AWS services and solve complex problems!
One of the most powerful features of Strands Agents SDK is its native support for Model Context Protocol (MCP) servers. MCP is a protocol that allows language models to access external tools and data sources.
Our AWS Cloud Engineer Agent integrates with two specialized MCP servers:
- AWS Documentation MCP Server: Provides access to comprehensive AWS documentation, allowing the agent to retrieve accurate information about AWS services, features, and best practices.
- AWS Diagram MCP Server: Enables the agent to generate visual AWS architecture diagrams based on text descriptions.
Here’s how we integrate these MCP servers in our code:
With this integration, our agent can now search AWS documentation and generate architecture diagrams without requiring any additional code to handle these specific tasks. The LLM decides when and how to use these tools based on the user’s request.
The AWS Cloud Engineer Agent consists of several components working together:

- Strands Agent: The core component built using Strands Agents SDK with AWS Bedrock’s Amazon Nova Premier model, implementing the agentic loop architecture.
- Streamlit UI: A user-friendly interface for interacting with the agent.
- AWS Infrastructure: Deployed using AWS CDK with:
- ECR repository for the Docker image
- ECS Fargate service for running the agent
- Application Load Balancer for routing traffic
- IAM roles with appropriate permissions
4. MCP Servers: External tools that extend the agent’s capabilities with AWS documentation search and diagram generation.
The architecture follows a serverless approach, making it scalable and cost-effective. The agent runs in an ECS Fargate container, which can scale based on demand.
Deploying the AWS Cloud Engineer Agent is straightforward using AWS CDK. The project includes a complete CDK stack that provisions all necessary resources in your AWS account.
Here’s how to deploy the agent:
- Prerequisites: Ensure you have AWS CDK installed and bootstrapped in your account, and Docker installed locally.
- Clone the repository:
3. Install dependencies:
3. Build the CDK project:
4. Deploy the stack:
The deployment process will:
- Create a Docker image of the agent
- Push it to Amazon ECR
- Provision the necessary AWS resources (VPC, ECS cluster, Fargate service, etc.)
- Set up the Application Load Balancer
Once deployment is complete, the CDK output will provide the URL where you can access the agent’s Streamlit interface.
The AWS Cloud Engineer Agent offers numerous benefits for developers and organizations:
- Faster Troubleshooting: Quickly identify and resolve issues with AWS resources
- Knowledge Assistance: Get instant answers to AWS-related questions without searching through documentation
- Infrastructure Visualization: Generate architecture diagrams to better understand complex systems
- Security Checks: Identify potential security vulnerabilities in your AWS configuration
- Cost Optimization: Find opportunities to reduce AWS spending
- Reduced Operational Overhead: Automate routine cloud management tasks
- Improved Security Posture: Proactively identify and address security issues
- Cost Savings: Identify unused or underutilized resources
- Knowledge Democratization: Make AWS expertise more accessible across the organization
- Faster Onboarding: Help new team members understand existing AWS infrastructure
Let’s see the AWS Cloud Engineer Agent in action with a real-world example. Suppose we want to identify unattached EBS volumes that could be removed to save costs.
User query:
Agent response:
This example demonstrates how the agent can:
- Break down a complex task into steps
- Execute AWS CLI commands across multiple regions
- Analyze the results and calculate cost implications
- Provide actionable next steps
When you’re done experimenting with the AWS Cloud Engineer Agent, you can easily clean up all the resources to avoid incurring any additional costs. AWS CDK makes this process simple with a single command:
This command will:
- Remove the ECS Fargate service
- Delete the Application Load Balancer
- Remove the ECR repository (after confirming)
- Delete the VPC and associated resources
- Clean up all IAM roles and policies created for the agent
The CDK destroy process will show you a summary of all resources that will be removed and ask for confirmation before proceeding. This ensures you have a chance to review what’s being deleted before finalizing the cleanup.
The AWS Cloud Engineer Agent showcases the power of combining large language models with specialized tools through the Strands Agents SDK. By adopting a model-first approach with an agentic loop architecture, we’ve created an assistant that can handle complex AWS management tasks with minimal code.
This project demonstrates how AI can augment cloud engineering work, making it more efficient and accessible. The integration with MCP servers further extends the agent’s capabilities, allowing it to access documentation and generate visualizations on demand.
Ready to try it yourself? The AWS Cloud Engineer Agent is open-source and available on GitHub. You can deploy it to your AWS account using the provided CDK code or run it locally for development and testing.
Get started today and experience the future of cloud infrastructure management!
Want to learn more about building AI agents with open-source Strands Agents SDK? Check out the official documentation and join the community of developers building the next generation of AI assistants.