maxtybar / bedrock-agents-cdk

Custom AWS CDK Constructs written in Typescript and transpiled to Go and Python using jsii. The project is open-sourced and published to npm package repository and Construct Hub. Using these constructs developers can easily integrate provisioning of Amazon Bedrock Agents and Amazon Knowledge Bases into their infrastructure.
Apache License 2.0
11 stars 5 forks source link

RDS (Aurora) support #5

Closed merojosa closed 9 months ago

merojosa commented 10 months ago

Hello again Max! Once again, congratulation for this amazing construct.

According to the Bedrock's UI and boto3 documentation, Amazon Bedrock now supports creating a knowledge base with Aurora as a vector database option. My team wants to try Aurora to deploy a knowledge base, so I'm wondering if you want to support Aurora in this construct.

I did actually fork this repo to start implementing the option in TypeScript to submit a PR here. Luckily, I saw that it's kinda simple (and smart): Just some interfaces and a Lambda that creates the Knowledge Bases (and Agents) via boto3.

However, I checked the changelog of boto3 and, as expected, the support for Aurora is pretty new.

image

And I think this is the current boto3 version of the layer: image

So I was wondering if you are willing to accept a PR from me with the Aurora support and an upgrade of the boto3 layer to get this new change because I'd love to contribute, if you agree of course.

maxtybar commented 10 months ago

Hi @merojosa , I did see the updates but am a little strapped on time with day-to-day job so I didn't have time to make any updates. But I would be glad to accept your PR, as long as you promise you've tested it out 🙂

merojosa commented 10 months ago

You got it @maxtybar. I'll make sure the new changes work and that they don't break anything.

Two questions before submitting the PR:

  1. Do you have the command and the requirements.txt to generate the layer? I'm seeing other dependencies (awscli, opensearchpy, etc...) apart from the ones that are generated by boto3. I just want to keep everything exactly as it is, except for the boto3 upgrade.
  2. I've never used projen, but I'm guessing the GitHub actions generate automatically the Go and Python packages based on the custom constructs in TypeScript. Is that correct, or should I update the Go types in bedrockagentscdk or something else to package the Go and Python constructs?
maxtybar commented 10 months ago
  1. I do not have any other requirements. To be honest with you, I created this layer a while back for multiple projects, zipped it and then reused it in multiple places. I would assume if you unzip it and then substitute boto3 folder there that should do the deal.
  2. I run yarn build in the root directory and it will build everything, including API documents and it will transpile TypeScript to Python and Go as well. And then you just push it GitHub and after PR it should update packages in NPM, PyPi and Go repositories through GitHub actions.