Bedrock on Outerbounds
Introductionβ
Welcome to the Bedrock on Outerbounds journey!
π Learning objectivesβ
The goal of this self-contained lesson is to configure your Outerbounds account to work with Amazon Bedrock. You will:
- set up an IAM role that allows Outerbounds to interact with Bedrock, and
- run text generation tasks from Outerbounds workstations and Metaflow tasks.
Create Bedrock resourcesβ
AWS Bedrock requires creating an IAM role with necessary permissions, and requesting access to the foundation models you want to use. You can see a full guide here.
Chain Bedrock role with Outerbounds task roleβ
Follow instructions on the Integrations view in your Outerbounds deployment.
Download the content to your workstationβ
Run the
outerbounds tutorials pull --url https://outerbounds-journeys-content.s3.us-west-2.amazonaws.com/main/journeys.tar.gz --destination-dir ~/learn
command to download the content to your workstation.
The downloaded content may include code packages for several journeys; the one we are interested in will reside under ~/learn/bedrock
.
If you are not running this example on Outerbounds, you can change the ~/learn
directory to a destination of your choice. If you are running on the platform, click next once you see Tutorials pulled successfully.
Use Bedrock in a workstation notebookβ
Open the notebook 00-nb
from the ~/learn/bedrock
directory. This notebook will guide you through the process of running text generation tasks using Bedrock models.
Use Bedrock in a workflowβ
Open the 01-flow
directory from the ~/learn/bedrock
directory. This directory contains a Metaflow flow that runs text generation tasks using Bedrock models.
Run the flow with the following command:
python flow.py run --with kubernetes
Next stepsβ
You have completed the primary steps of this journey, showing how you can use Bedrock features from Outerbounds. There are many more ways to integrate Outerbounds with other AWS services!
Some potential next steps:
- Explore other Bedrock model providers and capabilities
- Build more complex workflows combining Bedrock with other AWS services
- Integrate Bedrock into your existing ML pipelines