You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Production-ready Terraform modules for deploying and managing AWS Bedrock AgentCore infrastructure. This repository provides reusable Infrastructure as Code (IaC) modules for creating AgentCore runtime environments, endpoints, and memory systems with configurable strategies.
π Overview
Deploy AWS Bedrock AgentCore resources using Terraform modules. These modules simplify the provisioning of:
AgentCore Runtime - Containerized agent runtime with IAM roles, network configuration, and protocol support
AgentCore Runtime Endpoint - API endpoints for agent runtime access
AgentCore Memory - Long-term memory systems with semantic, summarization, and user preference strategies
β¨ Key Features
Feature
Description
Modular Architecture
Separate modules for runtime, endpoints, and memory for flexible deployments
Infrastructure as Code
Version-controlled, repeatable deployments with Terraform
Flexible IAM Management
Create new IAM roles or use existing ones with managed policy attachments
Network Flexibility
Support for both PUBLIC and VPC network modes with security groups and subnets
Boolean indicating if the role was created by the module
agentcore-memory Module
The memory module creates long-term memory systems for agents with configurable strategies for semantic understanding, summarization, and user preferences.
Features
Feature
Details
Memory Strategies
Configurable memory strategies using for_each for dynamic creation
Strategy Types
SEMANTIC, SUMMARIZATION, USER_PREFERENCE
Namespace Configuration
Custom namespace patterns for organizing memory data
Event Expiry
Configurable event expiry duration in days
Dynamic Creation
Create multiple strategies with a single configuration
Memory Module Variables
Variable
Type
Required
Default
Description
memory_name
string
No
"ComprehensiveAgentMemory"
Name of the Bedrock AgentCore memory
memory_description
string
No
"Full-featured memory with all built-in strategies"
Description of the memory
event_expiry_duration
number
No
30
Event expiry duration in days
memory_strategies
map(object)
No
{}
Map of memory strategies. See structure below
Memory Strategy Structure
Each strategy in memory_strategies must have the following structure:
memory_strategies={
semantic = {
name ="FactExtractor"
type ="SEMANTIC"
description ="Semantic understanding strategy"
namespaces = ["/facts/{actorId}"]
}
summary = {
name ="SessionSummarizer"
type ="SUMMARIZATION"
description ="Text summarization strategy"
namespaces = ["/summaries/{actorId}/{sessionId}"]
}
user_pref = {
name ="PreferenceLearner"
type ="USER_PREFERENCE"
description ="User preference tracking strategy"
namespaces = ["/preferences/{actorId}"]
}
}
Strategy Type
Description
Common Use Cases
SEMANTIC
Extracts and stores factual information and entities
Long-term fact storage, entity recognition
SUMMARIZATION
Generates and stores conversation summaries
Session context, conversation history
USER_PREFERENCE
Learns and stores user preferences
Personalization, user-specific settings
Memory Module Outputs
Output
Description
memory_id
ID of the Bedrock AgentCore memory
memory_arn
ARN of the Bedrock AgentCore memory
memory_name
Name of the Bedrock AgentCore memory
agentcore-runtime-endpoint Module
Creates API endpoints for accessing the agent runtime.