Building Blocks
CDK constructs for building custom applications.
Reusable AWS CDK L3 constructs. Import and customize to build exactly what you need.
Installation
npm install @cdklabs/cdk-appmod-catalog-blueprints
Available Constructs
AI Agents
| Construct | What It Does |
|---|---|
| InteractiveAgent | Real-time chatbots with SSE streaming, sessions, and auth |
| BatchAgent | Async AI processing for document analysis |
| BaseAgent | Abstract base for custom agent implementations |
| BedrockKnowledgeBase | RAG retrieval with access control |
import { InteractiveAgent } from '@cdklabs/cdk-appmod-catalog-blueprints';
import { Asset } from 'aws-cdk-lib/aws-s3-assets';
new InteractiveAgent(this, 'Chatbot', {
agentName: 'support-bot',
agentDefinition: {
bedrockModel: { useCrossRegionInference: true },
systemPrompt: new Asset(this, 'Prompt', { path: './prompt.txt' }),
},
});
Document Processing
| Construct | What It Does |
|---|---|
| AgenticDocumentProcessing | Document workflows with AI agents and tools |
| BedrockDocumentProcessing | Document classification and extraction |
| BaseDocumentProcessing | Abstract base for custom implementations |
import { AgenticDocumentProcessing } from '@cdklabs/cdk-appmod-catalog-blueprints';
import { Asset } from 'aws-cdk-lib/aws-s3-assets';
new AgenticDocumentProcessing(this, 'Processor', {
processingAgentParameters: {
agentName: 'doc-processor',
agentDefinition: {
bedrockModel: { useCrossRegionInference: true },
systemPrompt: new Asset(this, 'Prompt', { path: './prompt.txt' }),
},
prompt: 'Analyze and extract data from the document',
expectJson: true,
},
});
Web Application
| Construct | What It Does |
|---|---|
| Frontend | CloudFront + S3 web hosting for React apps, SPAs, static sites |
import { Frontend } from '@cdklabs/cdk-appmod-catalog-blueprints';
new Frontend(this, 'App', {
sourcePath: './frontend',
buildCommands: ['npm install', 'npm run build'],
});
Foundation & Utilities
| Construct | What It Does |
|---|---|
| Network | VPC with subnets and endpoints |
| AccessLog | Centralized access logging |
| EventBridgeBroker | Event routing for decoupled architectures |
| Observability | Logging, tracing, monitoring with Lambda Powertools |
| DataMasking | PII protection Lambda layer |
| DataLoader | Database initialization |
Architecture
All constructs follow a multi-layered design:
┌────── ───────────────────────────────────────────────────────────┐
│ Your Application Code │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ InteractiveAgent│ │ AgenticDocument │ │ Frontend │ │
│ │ (concrete) │ │ Processing │ │ (concrete) │ │
│ └────────┬────────┘ └────────┬────────┘ └─────────────────┘ │
│ │ │ │
│ ┌────────▼────────┐ ┌────────▼────────┐ │
│ │ BaseAgent │ │ BedrockDocument │ Foundation Layer │
│ │ (abstract) │ │ Processing │ (Network, Observ.) │
│ └─────────────────┘ └────────┬────────┘ │
│ ┌────────▼────────┐ │
│ │ BaseDocument │ │
│ │ Processing │ │
│ └─────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Extend base classes for custom behavior. Use concrete classes for standard use cases.
Ready-to-Deploy Solutions
See complete examples in action: examples/
| Solution | Constructs Used |
|---|---|
| Customer Service Chatbot | InteractiveAgent, Frontend |
| Retail Banking Chatbot | InteractiveAgent, BedrockKnowledgeBase, Frontend |
| Insurance Claims Portal | AgenticDocumentProcessing, Frontend |
| Fraud Detection | AgenticDocumentProcessing |
Security
All constructs include enterprise security by default:
- KMS encryption for data at rest
- TLS for data in transit
- Least-privilege IAM with resource-scoped permissions
- CDK Nag compliance for security best practices