Book “Amazon Bedrock Introduction to Generative AI Application Development” Hands-on sample code
This is a repository that stores sample code parts as files to facilitate hands-on implementation of the titled book.
- Those who purchased the paper book will also be able to copy and paste.
- If a problem occurs in the code due to future environmental changes, we will make appropriate modifications.
? Description of this GitHub repository
About books
If you don't have it yet, please buy it!
Introduction to Amazon Bedrock Generative AI App Development
The configuration of this repository
-
chapter⚫️
directory: Stores hands-on codes for each chapter and setting values that are difficult to enter manually.-
requirements.txt
, which describes the required Python libraries, is also included for your reference. -
README.md
provides supplementary information on how to respond to feature updates after the book is published.
If you find an error etc.
Please raise an issue in this repository. We will respond on a best effort basis.
Notice of typographical errors, etc.
We will post correct or incorrect information as appropriate on the SB Creative official website.
Updates and supplementary information on bugs after publication of the book
■ Countermeasures when many base models are “unusable” in Bedrock model access (targeted: Chapter 2 and hands-on in general)
This is an event that has been occurring since around mid-October. Please see the article below for how to deal with this issue.
Summary of countermeasures when Amazon Bedrock model access is often “unusable” recently
■ New use of Cloud9 is no longer possible (target: Appendix 4 and hands-on in general)
We have confirmed that new use of AWS Cloud9, which is provided as a hands-on development environment, has been partially restricted from July 29, 2024. We have published an alternative procedure to Appendix 4 in the following blog post. We are reexamining each chapter and updating the content from time to time.
AWS Cloud9 suddenly becomes unavailable for new use? Steps to use the alternative “SageMaker Studio Code Editor”
■ New model added (target: Chapter 2 and others)
[2024/6/20] Anthropic's new model "Claude 3.5 Sonnet" has been released!
A new model from Anthropic, the successor to the Claude 3 Sonnet. It is said to surpass Claude 3 Opus in both performance and cost.
- https://qiita.com/minorun365/items/cd46235d5e446b1f41c5
How to incorporate this book into your hands-on experience
- Activate
Claude 3.5 Sonnet
in Bedrock, Northern Virginia region using book page 80- The status may become "unavailable" and you may not be able to activate it. In that case, please try again later or contact AWS Support.
- In the sample code of each chapter, replace the part where Claude 3 Sonnet model ID is specified with Claude 3.5 Sonnet model ID (
anthropic.claude-3-5-sonnet-20240620-v1:0
)
Points to note
- Bedrock supports calling a single model via GUI or API, but does not support applied functions (knowledge base or agent) (as of June 20, 2024).
- With Knowkedge bases for Amazon Bedrock, you can immediately take advantage of Claude 3.5 Sonnet by using the
Retrieve
API (see page 216 of the book).
[2024/6/26] AI21 Labs' new model "Jumba-Instruct" has been released
A high-performance model that exceeds the company's existing model "Jurassic-2" series. Supports a large-capacity context window of 256K tokens. English is the only language available.
- AI21 Labs Jamba-Instruct model is now available in Amazon Bedrock | AWS Machine Learning Blog
[2024/7/24] Meta's new model "Llama 3.1" series released
A successor model to the company's existing model "Llama 3" series.
- Announcing Meta's Llama 3.1 405B, 70B, and 8B models on Amazon Bedrock | Amazon Web Services Blog
[2024/7/25] Mistral's new model "Mistral Large 2" has been released
- Mistral Large 2 is now available in Amazon Bedrock | AWS Machine Learning Blog
[2024/8/6] Claude 3 series now supports AWS Tokyo region
- Claude 3.5 Sonnet finally available on Bedrock in AWS Tokyo Region?
[2024/8/6] Amazon's new model "Titan Image Generator v2" released
- Playing with Amazon Titan Image Generator G1 V2 (Gradio is recommended)
- Amazon Titan Image Generator v2 now available on Amazon Bedrock
[2024/9/4] Stability AI's new models "Stable Image Ultra", "Stable Diffusion 3 Large (SD3 Large)" and "Stable Image Core" have been released
- Three new StabilityAI image generation models are now available in Bedrock!
■ Update of Bedrock application functions (Target: Chapters 4 to 6, etc.)
[2024/7/11] Many major updates related to generation AI (Bedrock, Amazon Q, other new services, etc.)
Explanatory slides are available. I think those who have read this book will find it easier to understand the updates!
- Explanation of Amazon Bedrock's large update, the fastest in the universe, released in the early hours of 7/11 - Speaker Deck
[2024/8/21] Bedrock’s batch inference feature now generally available
The functions explained in "6.4.1 Batch Inference" are now generally available. You can use it without the need for a dedicated SDK.
- Amazon Bedrock offers selected FMs for batch inference at 50% of on-demand inference prices.
[2024/8/27] Supports cross-region inference
Support for dynamic routing using multiple regions. For example, specifying "US Anthropic Claude 3.5 Sonnet" allows you to infer using the Northern Virginia and Oregon regions. To specify, specify the inference profile (dedicated model ID) as the model ID. (Example: us.anthropic.claude-3-5-sonnet-20240620-v1:0 )
- Amazon Bedrock now supports cross-region inference
■ Amazon Q update (target: Chapter 9)
[Within 2024] Amazon Q Business will support Japanese language and AWS Tokyo region
Reference article (Cloud Watch)
- AWS reveals availability timing of Claude 3 and Amazon Q for Business Japanese version in Tokyo region - Cloud Watch
Release of LangChain version 0.3.0
A new version of LangChain “0.3.0” has been released. (It was 0.2.0 at the time of writing the book). LangChain is used in Chapters 3, 4, and 5, but we confirmed that it works only by updating the library version. We have stored "requirements_langchain-0.3.0.txt" in the directory where we have verified its operation, so when implementing it with LangChain 0.3.0, please install it using the command below.
pip install -r requirements_langchain-0.3.0.txt
Book review blog introduction for readers
Thank you for all the wonderful output! ! ?♂️
- Omuron describes his impressions of the book ``Introduction to Amazon Bedrock Generated AI Application Development'' in the fastest way in the universe #Introduction to Bedrock Development - omuron's memorandum
- cyberBOSE "Amazon Bedrock Generative AI Application Development Introduction" Review #Bedrock Development Introduction #Python - Qiita
- s.hiruta Bedrock development introductory book review | Cloud infrastructure construction notes
- hmatsu47 Introducing Amazon Bedrock Generated AI App Development Introduction [AWS Deep Digging Guide] - Under construction.
- Renya K. Introducing the introductory bible for generative AI application development starting with "Amazon Bedrock"! ! #AWS - Qiita
- hayao_k Amazon Bedrock Generative AI Application Development Introduction Review #Bedrock Development Introduction #AWS - Qiita
- Popopo Hoshino [Book Review] Introduction to Amazon Bedrock Generated AI App Development | Popopo Hoshino (note form)
- kazzpapa3's Amazon Bedrock Introduction to Generative AI Application Development Book Review Called Miscellaneous Notes - Almost a memo blog for myself
- Naoki Ishihara "Introduction to Amazon Bedrock Generative AI Application Development" Review #Introduction to Bedrock Development #AWS - Qiita
- kzk_maeda I read the introduction to Bedrock development|kzk_maeda
- Hiroaki Yamamoto [Book Review] Introduction to Amazon Bedrock Generative AI Application Development [AWS Deep Digging Guide] | DevelopersIO
- Mr. Tsukuboshi "Amazon Bedrock Introduction to Generative AI Application Development" is the perfect introductory book to learn about generative AI application development on AWS | DevelopersIO
- Fumio Hirano recommends "Introduction to Amazon Bedrock Generative AI Application Development" | DevelopersIO
- Akihiro Ueno, please share your impressions of ``Amazon Bedrock Introduction to Generative AI Application Development''.
- yuki_ink AI agent starting with "Amazon Bedrock Generative AI Application Development Introduction" #AWS - Qiita
- Mr. Shima [Impressions] I read "Amazon Bedrock Introduction to Generative AI Application Development"
- mongolyy read "Introduction to Amazon Bedrock generative AI application development" - mongolyy's blog
- issy’s book “Amazon Bedrock Introduction to Generative AI Application Development-Chapter 4-” × AWS Summit Japan 2024
- Shinoda's book review "Amazon Bedrock Introduction to Generative AI Application Development" | Shinoda
- MK_Tech "Impressions" Amazon Bedrock generation AI application development introduction #AWS - Qiita
- Masaru Ogura's review of Amazon Bedrock Introduction to generative AI app development|Masaru Ogura