Giter Club home page Giter Club logo

amazon-bedrock-workshop's Introduction

Amazon Bedrock Workshop

This hands-on workshop, aimed at developers and solution builders, introduces how to leverage foundation models (FMs) through Amazon Bedrock.

Amazon Bedrock is a fully managed service that provides access to FMs from third-party providers and Amazon; available via an API. With Bedrock, you can choose from a variety of models to find the one that’s best suited for your use case.

Within this series of labs, you'll explore some of the most common usage patterns we are seeing with our customers for Generative AI. We will show techniques for generating text and images, creating value for organizations by improving productivity. This is achieved by leveraging foundation models to help in composing emails, summarizing text, answering questions, building chatbots, and creating images. While the focus of this workshop is for you to gain hands-on experience implementing these patterns via Bedrock APIs and SDKs, you will also have the option of exploring integrations with open-source packages like LangChain and FAISS.

Labs include:

  • 01 - Text Generation [Estimated time to complete - 45 mins]
    • Text generation with Bedrock
    • Text summarization with Titan and Claude
    • QnA with Titan
    • Entity extraction
  • 02 - Knowledge bases and RAG [Estimated time to complete - 45 mins]
    • Managed RAG retrieve and generate example
    • Langchain RAG retrieve and generate example
  • 03 - Model customization [Estimated time to complete - 30 mins]
    • Coming soon
  • 04 - Image and Multimodal [Estimated time to complete - 30 mins]
    • Bedrock Titan image generator
    • Bedrock Stable Diffusion XL
    • Bedrock Titan Multimodal embeddings
  • 05 - Agents [Estimated time to complete - 30 mins]
    • Customer service agent
    • Insurance claims agent
  • 06 - Open source examples (optional) [Estimated time to complete - 30 mins]
    • Langchain Text Generation examples
    • Langchain KB RAG examples
    • Langchain Chatbot examples
    • NVIDIA NeMo Guardrails examples
    • NodeJS Bedrock examples

imgs/11-overview

You can also refer to these Step-by-step guided instructions on the workshop website.

Getting started

Choose a notebook environment

This workshop is presented as a series of Python notebooks, which you can run from the environment of your choice:

Enable AWS IAM permissions for Bedrock

The AWS identity you assume from your notebook environment (which is the Studio/notebook Execution Role from SageMaker, or could be a role or IAM User for self-managed notebooks), 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. You can run the notebooks anywhere as long as you have access to the AWS Bedrock service and have appropriate credentials

For more information on the fine-grained action and resource permissions in Bedrock, check out the Bedrock Developer Guide.

Clone and use the notebooks

ℹ️ 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.

sudo yum install -y unzip
git clone https://github.com/aws-samples/amazon-bedrock-workshop.git
cd amazon-bedrock-workshop

You're now ready to explore the lab notebooks! Start with 00_Prerequisites/bedrock_basics.ipynb for details on how to install the Bedrock SDKs, create a client, and start calling the APIs from Python.

amazon-bedrock-workshop's People

Contributors

aarora79 avatar antara678 avatar ari-vedant-jain avatar athewsey avatar awsdabra avatar bsnehanshu avatar danystinson avatar fflannery avatar fireballdwf avatar harelix avatar jgalego avatar jld23 avatar jonathancaevans avatar kai-zhu-aws avatar kuriaks1 avatar lauerarnaud avatar lovaarte avatar mani-aiml avatar medinanomar avatar mikejgillespie avatar mttanke avatar omerh avatar rppth avatar rsgrewal-aws avatar ssinghgai avatar sunbc0120 avatar tchattha avatar visitani avatar w601sxs avatar zack-anthropic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.