npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@aws-mdaa/bedrock-knowledge-base-l3-construct

v1.3.0

Published

MDAA Bedrock Knowledge Base L3 Construct

Readme

Bedrock Knowledge Base L3 Construct

This construct provides a high-level abstraction for creating Amazon Bedrock Knowledge Bases with vector storage and data sources.

Features

  • Knowledge Base Creation: Creates Bedrock knowledge bases with vector configurations
  • Vector Store Management: Automatic Aurora PostgreSQL vector database setup
  • S3 Data Sources: Support for multiple S3 data sources with ingestion configurations
  • Vector Ingestion: Advanced parsing and chunking strategies
  • Auto-Sync: Optional Lambda-based automatic synchronization with S3 changes
  • IAM Management: Automatic creation of required IAM policies and roles
  • Logging: CloudWatch log group setup with delivery configuration

Usage

import { BedrockKnowledgeBaseL3Construct } from '@aws-mdaa/bedrock-knowledge-base-l3-construct';

const knowledgeBase = new BedrockKnowledgeBaseL3Construct(this, 'MyKB', {
  kbName: 'my-knowledge-base',
  kbConfig: {
    role: kbExecutionRole,
    vectorStore: 'my-vector-store',
    embeddingModel: 'amazon.titan-embed-text-v2:0',
    s3DataSources: {
      documents: {
        bucketName: 'my-docs-bucket',
        prefix: 'documents/',
        enableMultiSync: true
      }
    }
  },
  vectorStoreConfig: {
    vpcId: 'vpc-12345',
    subnetIds: ['subnet-1', 'subnet-2']
  },
  kmsKey: myKmsKey,
  roleHelper: roleHelper,
  naming: naming
});

Configuration Options

Knowledge Base Properties

  • role: Execution role for the knowledge base (required)
  • vectorStore: Reference to vector store configuration (required)
  • embeddingModel: Embedding model ID or ARN (required)
  • s3DataSources: Map of S3 data source configurations
  • vectorFieldSize: Optional vector field size override
  • supplementalBucketName: Optional supplemental storage bucket

Vector Store Properties

  • vpcId: VPC where the vector store will be deployed (required)
  • subnetIds: Subnet IDs for the vector store (required)
  • port: Optional database port (default: 5432)
  • engineVersion: Optional Aurora PostgreSQL version
  • minCapacity: Optional minimum Aurora Capacity Units
  • maxCapacity: Optional maximum Aurora Capacity Units

S3 Data Source Options

  • bucketName: S3 bucket name (required)
  • prefix: Optional S3 prefix filter
  • enableSync: Enable automatic sync on S3 changes limiting only one file at a time
  • enableMultiSync: Enable automatic sync on S3 bucket changes processing multiple file changes at the same time
  • vectorIngestionConfiguration: Advanced parsing and chunking options

Vector Ingestion Configuration

  • Parsing Strategies:
    • BEDROCK_DATA_AUTOMATION: Automated multimodal parsing
    • BEDROCK_FOUNDATION_MODEL: Custom foundation model parsing
  • Chunking Strategies:
    • FIXED_SIZE: Fixed token-based chunking
    • HIERARCHICAL: Parent-child chunking
    • SEMANTIC: Meaning-based chunking
    • NONE: No chunking

IAM Permissions

The construct automatically creates IAM policies with permissions for:

  • Embedding model invocation
  • Vector database access
  • S3 data source access
  • KMS key usage
  • Data source synchronization
  • CloudWatch logging

Dependencies

  • @aws-mdaa/cloudwatch-constructs
  • @aws-mdaa/dataops-lambda-l3-construct
  • @aws-mdaa/ec2-constructs
  • @aws-mdaa/iam-constructs
  • @aws-mdaa/iam-role-helper
  • @aws-mdaa/kms-constructs
  • @aws-mdaa/l3-construct
  • @aws-mdaa/rds-constructs
  • @aws-mdaa/construct
  • aws-cdk-lib
  • constructs