What if you could describe an application in plain English and have an AI-powered workflow help you design its AWS architecture, review security requirements, identify cost drivers, and prepare infrastructure code?
That is the idea behind agentic AI.
A traditional AI chatbot can recommend AWS services and explain how they work. An agentic workflow can go further by coordinating tasks, using approved tools, checking intermediate results, and revising its recommendations when problems are found.
In this article, we'll explore how to build an AWS Architecture Copilot using Amazon Bedrock, Bedrock AgentCore, Strands Agents, AWS Lambda, and other AWS services.
We'll also create a small Python validation example and discuss how to keep the workflow secure.
1. What Makes Agentic AI Different?
Consider this request:
Design a secure and cost-effective AWS architecture for an online store with a web frontend, product API, relational database, and product-image storage.
A basic chatbot might suggest Amazon S3, Amazon RDS, and compute services.
An agentic workflow could coordinate several additional steps:
- Analyze the application requirements.
- Retrieve relevant architecture standards.
- Propose an AWS architecture.
- Review the design against security requirements.
- Identify missing information for cost estimation.
- Generate an infrastructure-as-code proposal.
- Request approval before deployment.
The important difference is not simply using a more advanced model. It is coordinating reasoning, tool use, validation, and controlled actions.
These capabilities must be implemented in the application; they are not automatically provided as one complete workflow by a single AWS service.
2. AWS Services for an Agentic Workflow
Here are the main building blocks.
Amazon Bedrock
Amazon Bedrock provides access to foundation models for generative AI applications. A model can interpret requirements, generate structured recommendations, summarize technical documentation, and help an agent choose among its available tools.
Documentation: https://docs.aws.amazon.com/bedrock/
Amazon Bedrock AgentCore
AgentCore provides modular capabilities for deploying, connecting, securing, and monitoring agents.
Depending on your architecture, you may use:
- Runtime to run agents.
- Gateway to connect agents to approved tools and APIs.
- Memory to retain relevant context.
- Identity and Policy capabilities to support controlled access and actions.
- Observability and Evaluations to inspect and assess agent behavior.
You can use the capabilities that fit your application instead of adopting every component at once.
Documentation: https://docs.aws.amazon.com/bedrock-agentcore/
Strands Agents
Strands Agents is an open-source SDK for building AI agents. It helps developers define agent behavior and connect models to tools.
It can be used to implement an architecture planner, a security reviewer, or a coordinator for a multi-step workflow.
GitHub: https://github.com/strands-agents
Other AWS Services
| Service | Role in the workflow |
|---|---|
| Amazon S3 | Store architecture documents and generated artifacts |
| Amazon Bedrock Knowledge Bases | Retrieve relevant approved technical information |
| AWS Lambda | Run bounded validation and helper functions |
| AWS Step Functions | Coordinate predictable steps, retries, and approvals |
| AWS IAM | Apply least-privilege access |
| Amazon CloudWatch | Collect logs, metrics, and alarms |
| AWS CloudFormation or AWS CDK | Define infrastructure as code |
A useful design principle is to use agents for flexible analysis and conventional software for deterministic rules and controlled execution.
3. Reference Architecture
The following is a proposed architecture for an AI Architecture Copilot.
Developer
|
v
Web Application / API
|
v
Workflow Coordinator
|
v
AgentCore Runtime + Strands Agents
|
+------------------+------------------+
| | |
v v v
Architecture Security Cost
Planner Reviewer Analyst
| | |
+------------------+------------------+
|
v
Schema and Rule Checks
|
+--------+--------+
| |
v v
Needs Changes Ready for Review
| |
v v
Revise Plan Human Approval
|
v
Controlled Deployment
|
v
AWS Resources
The application can use Amazon Bedrock for model access, AgentCore for agent operations, S3 and Knowledge Bases for reference information, Lambda for validation, and Step Functions for workflow coordination.
The deployment stage can use CloudFormation or CDK through a controlled pipeline.
This is a reference design, not a deployed solution. The integrations and permissions must be implemented and tested.
4. Design the Agent Roles
You do not necessarily need four separate agents. These roles can be implemented as independent agents or as stages within one agentic application.
Architecture Planner
- Extracts requirements.
- Recommends AWS services.
- Identifies dependencies.
- Produces a structured architecture specification.
Security Reviewer
- Reviews network and identity assumptions.
- Checks whether data-protection requirements are addressed.
- Identifies missing evidence.
- Returns findings and remediation recommendations.
Cost Analyst
- Identifies compute, storage, database, and data-transfer cost drivers.
- Requests missing workload assumptions.
- Uses verified pricing data where available.
- Clearly labels estimates and unknowns.
Infrastructure Planner
- Prepares CloudFormation or CDK artifacts.
- Validates generated files.
- Summarizes proposed infrastructure changes.
- Waits for approval before deployment.
The benefit is separation of responsibility. A security reviewer should independently examine the architecture instead of simply repeating the planner's recommendations.
Multiple agents do not automatically mean better results, so test their outputs and measure their performance.
5. Mini Project: Validate Architecture Requirements with Python
Before sending a request to an AI agent, validate the input. Missing or inconsistent requirements can lead to poor recommendations.
Create a file named requirements.json:
{
"application": "online-store",
"region": "us-east-1",
"frontend": "web",
"api": true,
"relational_database": true,
"product_image_storage": true,
"requirements": {
"private_database": true,
"monitoring": true,
"human_approval_before_deployment": true
}
}
Now create validate_requirements.py:
import json
import sys
REQUIRED_FIELDS = {
"application",
"region",
"frontend",
"api",
"relational_database",
"product_image_storage",
"requirements",
}
def validate_requirements(filename):
with open(filename, encoding="utf-8") as file:
data = json.load(file)
missing = REQUIRED_FIELDS - data.keys()
if missing:
raise ValueError(
f"Missing fields: {', '.join(sorted(missing))}"
)
requirements = data["requirements"]
if not isinstance(requirements, dict):
raise ValueError("'requirements' must be an object.")
required_controls = (
"private_database",
"monitoring",
"human_approval_before_deployment",
)
missing_controls = [
key for key in required_controls
if key not in requirements
]
if missing_controls:
raise ValueError(
"Missing controls: "
+ ", ".join(missing_controls)
)
if requirements[
"human_approval_before_deployment"
] is not True:
raise ValueError(
"Human approval must be enabled before deployment."
)
print("PASS: Required input fields are present.")
print("PASS: Human approval is enabled.")
print("Next: Generate and review the architecture proposal.")
if __name__ == "__main__":
filename = (
sys.argv[1] if len(sys.argv) > 1
else "requirements.json"
)
try:
validate_requirements(filename)
except (
OSError,
json.JSONDecodeError,
ValueError,
) as error:
print(f"FAIL: {error}")
sys.exit(1)
Run the script:
python validate_requirements.py requirements.json
Expected output:
PASS: Required input fields are present.
PASS: Human approval is enabled.
Next: Generate and review the architecture proposal.
This example validates input fields and the approval setting. It does not verify that the proposed architecture is secure, correctly configured, or deployable.
For production, add JSON Schema validation, type checks, allowed-value checks, and tests for malformed input.
6. Give the Architecture Agent a Defined Task
Once the input is validated, an agent can analyze the requirements and produce a structured proposal.
For example:
You are the Architecture Planner for an AWS Architecture Copilot.
Analyze the supplied requirements and approved architecture references.
Return a structured proposal containing:
1. Recommended AWS services
2. Purpose of each service
3. Network and data-flow relationships
4. Security assumptions
5. Availability and scaling considerations
6. Missing requirements
7. Validation checks
Rules:
- Do not invent requirements.
- Mark assumptions and unknowns explicitly.
- Use approved architecture references when available.
- Do not claim checks passed without evidence.
- Do not deploy or modify AWS infrastructure.
- Return machine-readable JSON.
Your application should validate the returned JSON before passing it to the security-review stage.
The Security Reviewer can then return a status such as PASS, FAIL, or UNKNOWN, along with findings and supporting evidence.
Never treat UNKNOWN as PASS. If important information is missing, stop and request clarification.
7. Cost Analysis and Infrastructure Generation
After the architecture passes its required checks, the workflow can prepare cost and infrastructure artifacts.
The Cost Analyst should identify inputs such as:
- AWS Region.
- Expected request volume.
- Compute requirements.
- Database size and availability.
- Storage consumption.
- Data transfer.
- Logging and monitoring usage.
Use verified AWS pricing data and document the assumptions behind the estimate. A model-generated number alone is not a verified price.
The Infrastructure Planner can then prepare a CloudFormation template or CDK application. Validate the generated artifacts and review the proposed changes before allowing a deployment pipeline to execute them.
8. Security Controls for Production
Giving an AI agent access to cloud tools introduces risks. Build the controls into the architecture from the beginning.
- Least privilege: Give each component only the permissions it requires.
- Approved tools: Expose narrowly scoped operations instead of unrestricted AWS access.
- Human approval: Require explicit authorization for impactful changes.
- Input and output validation: Reject malformed or incomplete data.
- Secrets management: Never place credentials in prompts or generated source files.
- Auditability: Record tool calls, validation results, approvals, and deployment outcomes.
- Bounded execution: Apply timeouts, retry limits, and resource limits.
- Evaluation: Test for incorrect recommendations, prompt injection, and unsafe tool use.
- Rollback planning: Define a recovery path for unsuccessful deployments.
Amazon Bedrock Guardrails can provide additional safeguards for supported model interactions. They do not replace IAM, application authorization, infrastructure validation, or security testing.
9. When Should You Use Agentic AI?
Agentic workflows are useful when tasks involve multiple steps, changing context, tool usage, and decisions that may need revision.
Potential use cases include:
- AWS architecture recommendation.
- Cloud migration planning.
- Infrastructure troubleshooting.
- Cost-optimization analysis.
- Documentation and compliance preparation.
- Developer workflow automation.
However, a simple deterministic task may be better handled by a Lambda function or conventional workflow. Agents introduce additional latency, cost, complexity, and evaluation requirements.
A strong production architecture combines flexible AI reasoning with deterministic controls.
Conclusion
Agentic AI can help developers move beyond one-off AI responses toward workflows that coordinate architecture design, security review, cost analysis, and infrastructure preparation.
Using Amazon Bedrock, Bedrock AgentCore, Strands Agents, AWS Lambda, Step Functions, Amazon S3, IAM, and controlled deployment pipelines, teams can build an Architecture Copilot that turns natural-language requirements into a reviewable technical proposal.
Start small, validate every important output, and measure the quality of the results before expanding the workflow.
The goal isn't to give AI unrestricted access to AWS. It's to let AI handle more of the analysis while engineers stay in control of critical decisions.

Top comments (0)