Applied AI & Data Scienceby Dr. Dennis Weiser20244 min read
Deploying generative AI with Amazon Bedrock
Amazon Bedrock provides foundation models from various vendors as a serverless service in the AWS cloud. An overview of access, data security, customisation options, agent systems, usage modes and available models.
Introduction
Since the release of ChatGPT in November 2022, more and more people have been using generative AI in their professional or private lives. Very early on, OpenAI also released an interface to make its models available to developers. At the time, many companies carried out their first pilot developments based on the OpenAI interface.
The trend in generative AI has since developed to the point where countless vendors offer large, general-purpose base models (so-called foundation models), either commercially or on an open-source basis. Major cloud providers such as AWS, Azure and Google Cloud now offer services for deploying these foundation models in a dedicated, secure cloud environment. Combined with open-source foundation models, the security, flexibility and scalability of the cloud open up unprecedented possibilities for building solutions based on generative AI.
In this blog post, we want to look specifically at the current options for deploying generative AI using the AWS service Amazon Bedrock.
Amazon Bedrock
Amazon Bedrock is a fully managed service that makes various current foundation models available through a single interface. Because it is a serverless service, you do not have to manage the underlying computing infrastructure yourself.
Amazon Bedrock can be accessed either over the internet or through a private connection directly from your own virtual private cloud (VPC). The latter is possible once an interface endpoint has been created via AWS PrivateLink.
AWS Cloud
Customer account
Customer VPC
Amazon Bedrock service account
Corporate network
User-specific data (model inputs and outputs) is isolated per user, encrypted and not shared. In particular, this data is not used to improve the models. It is also possible to fine-tune models with your own data. In this case, the fine-tuned model is provided as a separate private instance (single tenant) to which only its creator has access.
Besides using the foundation models as they are, Amazon Bedrock currently offers two options for adapting the large, general-purpose models to your own data:
Retrieval augmented generation (RAG)
Retrieval augmented generation uses a generic foundation model. It is adapted to the customer's data through context, without the model itself having to be changed. In a first step, the specific knowledge base that is to be attached to the model is searched with respect to the input. In a second step, matching information is then passed to the model as context, so that it can produce a targeted output.
Model customisation
There are two ways of customising foundation models: fine-tuning and continued pre-training. Fine-tuning can increase model precision by using a task-specific labelled training dataset to further adapt the foundation model. Continued pre-training can be used to give the foundation model more domain-specific knowledge by using an unlabelled training dataset to build up its knowledge.
Amazon Bedrock also makes it possible to build so-called agent systems with foundation models. These are autonomous systems that orchestrate the interaction between foundation models, data sources, software applications and user input. You can think of them as programmed robots that can work through specific tasks independently and automatically. Agents therefore go beyond the "next word prediction" principle of LLMs and now enable tools/applications to be used autonomously. Agent systems are often credited with great potential in the field of automation.
There are three modes to choose from when using the models: on-demand, batch or provisioned throughput. In on-demand and batch mode, usage is billed per input/output token; with provisioned throughput, the units of provisioned time are billed, regardless of usage.
Generative AI models in Amazon Bedrock
Amazon Bedrock supports various foundation models from different vendors. At present, the selection still varies considerably depending on the AWS region chosen. For example, the current top model, Anthropic Claude 3.5 Sonnet, is so far only available in the North Virginia region (us-east-1). Below we give an overview of the 8 best foundation models currently available:
| Foundation model | Use | Input tokens | HELM MMLU score |
|---|---|---|---|
| Anthropic Claude 3.5 Sonnet | Text & image | 200000 | 86.5% |
| Anthropic Claude 3 Opus | Text & image | 200000 | 84.6% |
| Meta Llama 3 70B | Text | 8000 | 79.3% |
| Anthropic Claude 3 Sonnet | Text & image | 200000 | 75.9% |
| Anthropic Claude 3 Haiku | Text & image | 200000 | 73.8% |
| Mistral AI Mixtral 8x7B | Text | 32000 | 71.7% |
| Mistral AI Mistral Large | Text | 32000 | 68.8% |
| Meta Llama 3 8B | Text | 8000 | 66.8% |
The foundation models are sorted by their result in the Massive Multi-task Language Understanding (MMLU) benchmark from Stanford CRFM. This is a widely used benchmark that aims to test the performance of LLMs across 57 subject areas with around 16,000 multiple-choice questions. The performance range of the foundation models listed here is comparable to OpenAI's well-known foundation models GPT-3.5 Turbo (68.9%) and GPT-4o (84.2%).
Conclusion
Amazon Bedrock offers a user-friendly solution for deploying generative AI. Thanks to the serverless architecture, you do not have to manage the underlying computing infrastructure yourself. Comprehensive security mechanisms are in place to ensure the confidentiality and protection of your own data. State-of-the-art foundation models for text and images are available, with performance comparable to OpenAI's GPT-3.5 or even GPT-4o.
In summary, Amazon Bedrock is an excellent way to put generative AI to work and thereby build innovative solutions in the AWS cloud.
More publications
More on Applied AI & Data ScienceApplied AI & Data Science
SAP Business Data Cloud – Unleashing business AI?
Applied AI & Data Science
Artificial intelligence in SAP without the Business Data Cloud? What HANA ML and AI Core can already do today
Applied AI & Data Science
Efficient ETL processes without AWS Glue: Polars as a powerful alternative
Applied AI & Data Science
Working on a similar topic?
Tell us what you are working on. We'll put you in touch with Dr. Dennis Weiser and the team working on this topic.



