This repository contains a collection of Generative AI samples and examples using AWS services and AWS partner products.
This repository is subdivided into sections for participating partners. Each partner section has its own subsection of examples. These examples each provide a demonstration of a common service implementation, or infrastructure pattern that could be useful to build your own Generative AI Application
To get started with the code examples, clone the repository and navigate to the relevant partner directory. Refer to the detailed instructions provided in each partner directory's README.
This workshop is presented as a series of Python notebooks, which you can run from the environment of your choice:
- For a fully-managed environment with rich AI/ML features, we'd recommend using SageMaker Studio. To get started quickly, you can refer to the instructions for domain quick setup.
- For a fully-managed but more basic experience, you could instead create a SageMaker Notebook Instance.
- If you prefer to use your existing (local or other) notebook environment, make sure it has credentials for calling AWS.
The AWS identity you assume from your environment (which is the Studio/notebook Execution Role from SageMaker, or could be a role or IAM User for self-managed notebooks or other use-cases), must have sufficient AWS IAM permissions to call the Amazon Bedrock service.
To grant Bedrock access to your identity, you can:
- Open the AWS IAM Console
- Find your Role (if using SageMaker or otherwise assuming an IAM Role), or else User
- Select Add Permissions > Create Inline Policy to attach new inline permissions, open the JSON editor and paste in the below example policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "BedrockFullAccess",
"Effect": "Allow",
"Action": ["bedrock:*"],
"Resource": "*"
}
]
}
⚠️ Note: With Amazon SageMaker, your notebook execution role will typically be separate from the user or role that you log in to the AWS Console with. If you'd like to explore the AWS Console for Amazon Bedrock, you'll need to grant permissions to your Console user/role too.
ℹ️ Note: In SageMaker Studio, you can open a "System Terminal" to run these commands by clicking File > New > Terminal
Once your notebook environment is set up, clone this workshop repository into it.
git clone https://github.com/aws-samples/aws-generativeai-partner-samples
cd <your partner directory>
If you wish to clone a specific partner directory, please use the below set commands
git clone --depth 1 --no-checkout https://github.com/aws-samples/aws-generativeai-partner-samples
cd aws-generativeai-partner-samples/
git sparse-checkout set <INSERT_DESIRED_SUBDIRECTORY_RELATIVE-PATH>
git checkout
We welcome community contributions! Please see CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.