AWS Generative AI CDK Constructs
The AWS Generative AI Constructs Library is an open-source extension designed to enhance the AWS Cloud Development Kit (CDK). It aims to simplify the process of building generative AI solutions by providing a set of well-structured patterns, known as constructs, which help developers define infrastructure in code. This approach ensures that the infrastructure is both repeatable and predictable. The constructs are high-level abstractions that integrate multiple AWS services, following best practices to form what are termed well-architected patterns.
CDK Versions
The Generative AI CDK Constructs operate separately from the AWS CDK, meaning each has its own release schedule. To ensure compatibility, each version of the Generative AI constructs is aligned with a specific version of the CDK. It's important for users to check the version compatibility through the changelog to avoid integration issues when updating.
Contributing
The project is open to contributions from the community. Those interested can refer to the contributor guide, which details guidelines for those who wish to participate in the project’s evolution.
Design Guidelines and Development Guide
For developers looking to add new constructs to the library, there are dedicated design guidelines and development guides. These resources provide a structured approach to designing and developing new patterns, ensuring they align with the library's existing architecture.
Getting Started
The library supports multiple programming languages including TypeScript, Python, C#, Go, and Java. Users can start by creating a CDK application in their language of choice and then installing the generative AI constructs package. Step-by-step instructions for each language are provided, facilitating the setup process.
Catalog
The library offers a range of constructs tailored to specific use cases. These constructs fall into two categories: Level 3 (L3) and Level 2 (L2).
L3 Constructs
L3 constructs are comprehensive patterns that use a combination of AWS services. Examples include:
- Data Ingestion Pipelines: For OpenSearch and Kendra, designed for document storage in knowledge bases.
- Question Answering: Utilizing large language models for complex queries.
- Summarization: Providing document summaries with AI models.
- SageMaker Model Deployment: Facilitates deploying models from SageMaker JumpStart, Hugging Face, or custom locations.
- Content Generation: Generates images from text using specific AI models.
- Other Constructs: Including web crawlers, monitoring setups, and more.
L2 Constructs
L2 constructs serve as building blocks for more complex patterns. Examples include:
- Lambda Layer: Offers dependencies and utilities critical for generative AI apps on AWS.
- Amazon Bedrock and OpenSearch: Constructs for setting up Bedrock services and OpenSearch resources.
Sample Use Cases
The official samples repository provides a collection of ready-to-implement use cases. These samples demonstrate practical applications of the constructs and can be used to explore potential implementations in a real-world context. They combine constructs into stacks, forming complete applications known as CDK apps.
Additional Resources
AWS Generative AI CDK Constructs are supported by multiple resources, including keynotes, workshops, blog posts, videos, and code samples. Notable examples include the AWS re:Invent 2023 keynote and various workshops on building generative AI applications.
Contributors and Operational Metrics
The project is community-driven, with numerous contributors helping to improve and expand its capabilities. It also includes operational metrics to help in the development and maintenance of the constructs, collecting anonymous usage data such as region and version.
Roadmap and License
Users can view the project's roadmap on GitHub for insights into future developments. As an open-source project, it is licensed under the Apache-2.0 license, and users are encouraged to independently assess and optimize the constructs for production use according to their standards.
Conclusion
AWS Generative AI CDK Constructs offer developers an efficient way to deploy AI solutions using AWS infrastructure. By providing reusable patterns and extensive documentation, the library accelerates the development process and encourages best practices in AI application deployment.