Skip to main content

Building Blocks

CDK constructs for building custom applications.

GitHub Construct Hub Documentation

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

ConstructWhat It Does
InteractiveAgentReal-time chatbots with SSE streaming, sessions, and auth
BatchAgentAsync AI processing for document analysis
BaseAgentAbstract base for custom agent implementations
BedrockKnowledgeBaseRAG 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

ConstructWhat It Does
AgenticDocumentProcessingDocument workflows with AI agents and tools
BedrockDocumentProcessingDocument classification and extraction
BaseDocumentProcessingAbstract 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

ConstructWhat It Does
FrontendCloudFront + 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

ConstructWhat It Does
NetworkVPC with subnets and endpoints
AccessLogCentralized access logging
EventBridgeBrokerEvent routing for decoupled architectures
ObservabilityLogging, tracing, monitoring with Lambda Powertools
DataMaskingPII protection Lambda layer
DataLoaderDatabase 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/

SolutionConstructs Used
Customer Service ChatbotInteractiveAgent, Frontend
Retail Banking ChatbotInteractiveAgent, BedrockKnowledgeBase, Frontend
Insurance Claims PortalAgenticDocumentProcessing, Frontend
Fraud DetectionAgenticDocumentProcessing

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