Amazon Bedrock: generative AI on AWS, one interface, many models

Amazon Bedrock offers a single interface to use generative AI models from different providers, with data kept in Europe and built-in RAG. Find out how to choose and test them...
Categoria: Data & AI, ADtech

Article by Giuseppe Caliendo – Full-stack Developer at AzzurroDigitale

After seeing how AWS manages databases for us with RDS, the next step is to build artificial intelligence applications. Amazon Bedrock lets you use models from different providers through the same API, with no servers to manage and paying only for what you use. In this article we look at how to choose the right model for each task, how to test it, how to keep data in Europe in compliance with the GDPR, and how to give models your company’s knowledge with RAG and Knowledge Bases.

In the last episode we talked about RDS and how to let AWS handle the boring part of databases. Once the data is safe, the next question comes almost immediately: how do I build an artificial intelligence application on top of it?

In the B2B world almost nobody trains their own LLM: models from specialised providers already exist and are used via API. Each provider has its own APIs, and this is where Amazon Bedrock comes in to help us.

Amazon Bedrock gives us “a single interface” that provides access, through the same API, to models from different providers: Anthropic, Meta, Mistral, Cohere, AI21, Amazon’s Nova family, DeepSeek and over a hundred models from the Marketplace. Let’s see what this means in practice.

A single access point: the application always calls the same service, with the same AWS authentication (IAM), the same logs and the same monitoring tools, regardless of the model behind it.

In the simplest case, changing model means changing a parameter, not rewriting the integration. No infrastructure to manage: no servers, no GPUs to size. You pay based on usage, measured in “tokens” (fragments of text, roughly pieces of words, that the model reads and writes).

A robot waiter serving various generative AI models on a tray, as offered by Amazon Bedrock

Why we like it: no model is the best at everything

Each model has its own strengths, and the most powerful one is not necessarily the right one for every task. An example of how to reason about it:

Classifying incoming emails or tickets: a repetitive, high-volume task where speed and cost matter. A small, inexpensive model is usually enough.

Answering complex technical questions about detailed documentation: here reasoning and the ability to follow long instructions justify a larger model, even if it costs more.

Extracting structured data from documents or generating code: some models are significantly more reliable than others, and it is worth measuring this rather than trusting the name.

Test before you choose

A simple method that works in most projects:

  1. Collect 30-50 real (anonymised) requests along with the answer you expect.
  2. Run them on two or three different models, changing only the model parameter.
  3. Compare quality, response times and cost per request.
  4. Choose model by model, use case by use case: nothing stops you from using a lightweight model for sorting and a more powerful one for the difficult answers.

Data in Europe and GDPR

Where does our data end up when we send it to a model? With Bedrock, if properly configured, processing stays within European borders: all you need is an EU inference profile (in the code, the prefix eu. before the model identifier), which never routes requests outside Europe. AWS provides the tools; GDPR compliance (legal basis, privacy notices, access permissions) remains the responsibility of whoever builds the application.

Map of Europe with AI models processed within European borders, compliant with the GDPR and the AI Act

Giving models your company’s knowledge: RAG and Knowledge Bases

A model knows a lot in general, but it doesn’t know your manuals, your procedures or your contracts. The most widespread solution is called RAG (Retrieval-Augmented Generation): the system searches your documents for the relevant passages, passes them to the model together with the question, and the model answers based on those sources, which can also be cited.

Building it yourself means splitting the documents, turning them into “embeddings” (numerical representations of the meaning of the text, which make it possible to search by similarity and not just by keyword), storing them in a vector database and keeping everything up to date. Bedrock Knowledge Bases manage this chain for you. The advantage, for the topic of this episode, is that the knowledge base stays the same even if you change the model that answers: the work done on the documents is not thrown away.

One access point, many models: the right AI for every need

To sum up: Bedrock gives access to many models through a single interface, so choosing the model becomes a decision to test and revisit. At AzzurroDigitale we have integrated it into our products! If you want to know more about what we have done, write to us!

Share on

Facebook
X
LinkedIn
WhatsApp
Threads

You might be interested in

AI Act: a guide to the safe factory after the Digital Omnibus

Data & AIUncategorized

OEE: what it is, how to calculate it, and how to improve it

Data & AIDigital Transformation

Everyone is talking about AI.

Few are truly ready to use it.

Find out where your company stands before you invest.