generative-ai-cdk-constructs is a free, open source documentation & knowledge base project written in TypeScript and released under Apache-2.0. It has 541 GitHub stars, 77 forks and 12 open issues, and was last pushed 5 hours ago. On this registry it ranks #86 of 91 tracked projects in Documentation & Knowledge Base, with 5 head-to-head comparisons available.

AWS Generative AI CDK Constructs

Stability: Experimental

All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


View on Construct Hub

PyPI version npm version NuGet Version Maven Central Version Go Version

Terraform Amazon Bedrock Module Terraform Amazon OpenSearch Serverless Module Terraform Amazon SageMaker Endpoint Module Terraform Streamlit Module

Table of contents

Introduction

The AWS Generative AI Constructs Library is an open-source extension of the AWS Cloud Development Kit (AWS CDK) that provides multi-service, well-architected patterns for quickly defining solutions in code to create predictable and repeatable infrastructure, called constructs. The goal of AWS Generative AI CDK Constructs is to help developers build generative AI solutions using pattern-based definitions for their architecture.

The patterns defined in AWS Generative AI CDK Constructs are high level, multi-service abstractions of AWS CDK constructs that have default configurations based on well-architected best practices. The library is organized into logical modules using object-oriented techniques to create each architectural pattern model.

CDK Versions

AWS Generative AI CDK Constructs and the AWS CDK are independent teams and have different release schedules. Each release of AWS Generative AI CDK Constructs is built against a specific version of the AWS CDK. The CHANGELOG.md file lists the CDK version associated with each AWS Generative AI Constructs release. For instance, AWS Generative AI CDK Constructs v0.0.0 was built against AWS CDK v2.96.2. This means that to use AWS Generative AI CDK Constructs v0.0.0, your application must include AWS CDK v2.96.2 or later. You can continue to use the latest AWS CDK versions and upgrade the your AWS Generative AI CDK Constructs version when new releases become available.

Contributing

Contributions of all kinds are welcome! Check out our contributor guide

Design guidelines and Development guide

If you want to add a new construct to the library, check out our design guidelines, then follow the development guide

Getting Started

TypeScript
  • Create or use an existing CDK application in TypeScript.
    • cdk init app --language typescript
  • Run npm install @cdklabs/generative-ai-cdk-constructs
  • The package should be added to your package.json.
  • Import the library:
    • import * as genai from '@cdklabs/generative-ai-cdk-constructs';
Python
  • Create or use an existing CDK application in Python
    • cdk init app --language python
  • Install the package:
    • pip install cdklabs.generative-ai-cdk-constructs
  • Import the library:
    • import cdklabs.generative_ai_cdk_constructs
NuGet
  • Create or use an existing CDK application in Python
    • cdk init app --language csharp
  • Install the package while in the Visual Studio project:
    • dotnet add package CdkLabs.GenerativeAICdkConstructs
  • Use the namespace:
    • using Cdklabs.GenerativeAiCdkConstructs;
Go
  • Create or use an existing CDK application in Python
    • cdk init app --language go
  • Get the module:
    • go get github.com/cdklabs/generative-ai-cdk-constructs-go/generativeaicdkconstructs
  • Import the library:
    • import "github.com/cdklabs/generative-ai-cdk-constructs-go/generativeaicdkconstructs"

NOTE: The Go distribution repository, distributes the JSII tar gzipped versioned source from the source repository

Java
  • Create or use an existing CDK application in Java
    • cdk init app --language java
  • Add the dependency into the pom.xml
<dependency>
    <groupId>io.github.cdklabs</groupId>
    <artifactId>generative-ai-cdk-constructs</artifactId>
    <version>Get the latest version and insert it here</version>
</dependency>

Refer to the documentation for additional guidance on a particular construct: Catalog

Catalog

The following constructs are available in the library:

L3 constructs

Construct Description AWS Services used
SageMaker model deployment (JumpStart) Deploy a foundation model from Amazon SageMaker JumpStart to an Amazon SageMaker endpoint. Amazon SageMaker
SageMaker model deployment (Hugging Face) Deploy a foundation model from Hugging Face to an Amazon SageMaker endpoint. Amazon SageMaker
SageMaker model deployment (Custom) Deploy a foundation model from an S3 location to an Amazon SageMaker endpoint. Amazon SageMaker
Amazon Bedrock Monitoring (Amazon CloudWatch Dashboard) Amazon CloudWatch dashboard to monitor model usage from Amazon Bedrock. Amazon CloudWatch
Bedrock Data Automation Use Amazon bedrock data automation client to to build and manage intelligent document processing, media analysis, and other multimodal data-centric automation solutions AWS Lambda, Amazon S3 bucket
Bedrock Batch Step Functions Manage Bedrock model invocation jobs(batch inference) in AWS Step Functions state machines AWS Step Functions, AWS Lambda, AWS EventBridge, Amazon Bedrock, AWS IAM

L2 Constructs

[!WARNING] Important: Amazon Bedrock L2 constructs are transitioning to the AWS CDK core repository. You can now find these constructs at: https://github.com/aws/aws-cdk/tree/main/packages/%40aws-cdk/aws-bedrock-alpha. Please migrate to the alpha package, as Bedrock L2 constructs in this repository are now deprecated and will no longer receive updates.

| Construct |Description| AWS Services used |

readme truncated — read the full docs on github

Frequently asked questions

Is generative-ai-cdk-constructs free to use?

generative-ai-cdk-constructs is open source under the Apache-2.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does generative-ai-cdk-constructs do?

AWS Generative AI CDK Constructs are sample implementations of AWS CDK for common generative AI patterns.

What is generative-ai-cdk-constructs written in?

generative-ai-cdk-constructs is primarily written in TypeScript. Its source is publicly available at https://github.com/awslabs/generative-ai-cdk-constructs, and it has 541 GitHub stars.