Create Amazon Bedrock Agent
Prerequisites
Before creating an agent, ensure the following IAM permissions are ready:
- •Agent Role: A service role allowing
bedrock.amazonaws.comto assume it. - •Model Access: The account must have access to the foundation model (e.g., Anthropic Claude).
Workflow
- •
Determine Implementation Method:
- •If the user uses Infrastructure as Code (IaC) -> Use Terraform patterns.
- •If the user wants a script or programmatic creation -> Use Python (Boto3) patterns.
- •
Select Components:
- •Agent: The core orchestrator.
- •Action Group: (Optional) For executing tasks via Lambda.
- •Knowledge Base: (Optional) For RAG capabilities.
Terraform Implementation
See terraform.md for resource definitions.
Python (Boto3) Implementation
See python.md for SDK usage examples.
Validation
After creation, always advise the user to:
- •Prepare the agent (create a draft version).
- •Test in the AWS Console or via
invoke_agentAPI using theDRAFTalias.