Integrate Amazon Bedrock with Astra DB Serverless
You can use Astra DB Serverless (Vector) databases with Amazon Bedrock.
This tutorial explains how to run a notebook in an Amazon SageMaker Studio environment. The notebook demonstrates a basic question-and-answer system with LangChain, Amazon Bedrock, and an Astra DB Serverless database.
Prerequisites
To complete this tutorial, you need the following:
-
An active Astra account
-
An active Serverless (Vector) database
-
An application token with the Database Administrator role
-
Credentials for an AWS identity with access to Amazon Bedrock
-
Access to Amazon SageMaker
Run the notebook in Amazon SageMaker
-
Download the tutorial notebook from GitHub and save it locally.
-
In the Amazon SageMaker console navigation pane, click Studio.
-
Create or select a SageMaker domain.
If you create a domain, set up a single user domain with the default settings.
-
Create or select a user profile.
-
Click Open Studio.
-
Click JupyterLab.
-
Click Create Jupyter Lab space.
-
Enter a name for the space, and then click Create space.
-
Leave the default settings as configured, and then click Run space.
When the space is ready, the status changes to Running.
-
To open the Jupyter Lab space, click
Open. -
In the Jupyter Lab space, click
Upload Files. -
Upload the tutorial notebook.
-
To open the notebook, double-click it.
-
To run the notebook, click Run, and then select Run All Cells.
-
When prompted, input secrets required by the notebook, such as your application token.