AWS Learning Journey

Bedrock, SageMaker, and the AI You Don't Have to Train: AI Services on AWS

Amazon Bedrock and model selection, Knowledge Bases, Agents, and Guardrails; Amazon SageMaker for training and deployment; and ready-made AI services — Textract, Comprehend, Rekognition, Transcribe, and Translate.

9 min read · 1763 words
AWSGenerative AIAmazon BedrockMachine LearningArtificial Intelligence
Bedrock, SageMaker, and the AI You Don't Have to Train: AI Services on AWS cover image

AWS from Zero to Production — Phase 11, Part 2 of 3 · See the full series roadmap


AWS offers AI at three levels — and the most common mistake is starting at the wrong one.

A team spends three months building and training a custom model to extract invoice fields — when Amazon Textract does it with one API call. Another team builds its own chatbot infrastructure from scratch — when Amazon Bedrock provides models, retrieval, and safety controls as managed services. A third tries to make a general-purpose LLM predict churn from tabular data — when a classic model in SageMaker would be cheaper, faster, and more accurate.

This article maps the AWS AI landscape so you start at the right level.

What you’ll walk away with


Three layers of AI on AWS

Layer                         What you do                      Examples
AI services                   call an API, no ML expertise     Textract, Comprehend, Rekognition,
                                                               Transcribe, Translate
Generative AI platform        choose a model, add your data,   Amazon Bedrock (models, Knowledge
                              guardrails, and tools            Bases, Agents, Guardrails)
ML platform                   build, train, and deploy your    Amazon SageMaker
                              own models

Start at the top. Move down only when the layer above can’t do the job.


Amazon Bedrock

Amazon Bedrock is a fully managed service for building with foundation models through a single API.

The Converse API

One request format for every chat model:

import boto3

bedrock = boto3.client("bedrock-runtime")

response = bedrock.converse(
    modelId="us.amazon.nova-lite-v1:0",  # check model and inference profile availability in your Region
    system=[{"text": "You are a concise assistant for an e-commerce operations team."}],
    messages=[{"role": "user", "content": [{"text": "Summarize this incident in two sentences: ..."}]}],
    inferenceConfig={"maxTokens": 300, "temperature": 0.2},
)

print(response["output"]["message"]["content"][0]["text"])
print(response["usage"])  # input and output tokens — what you pay for

Switching models is mostly a matter of changing modelId.

Inference profiles: Many models are invoked through cross-Region inference profiles — IDs like us. or eu. prefixes — which route requests across Regions in a geography for more throughput. Check the model’s availability and profile ID in your Region.


Foundation model selection

There’s no single best model. Choose by your task, against these criteria:

How to choose

  1. Build a small evaluation set: 50–200 real questions with good reference answers.
  2. Try two or three candidate models — from small and cheap to large and capable.
  3. Score them — with Bedrock model evaluation (automatic metrics, human review, or LLM-as-a-judge).
  4. Pick the smallest model that meets your quality bar. It’s usually much cheaper and faster.

Engineer’s note: Use different models for different steps. A small, fast model can classify or route requests; a larger one handles the hard reasoning.


Bedrock Knowledge Bases: managed RAG

Knowledge Bases implement the RAG pipeline from Part 1 as a managed service:

Data sources            Ingestion                     Vector store
S3, web crawler,   ->   parse, chunk, embed      ->   OpenSearch Serverless, Aurora pgvector,
Confluence,             (managed, incremental sync)   S3 Vectors, and others
SharePoint,
Salesforce

You’ll build one in Part 3.


Bedrock Agents: models that take actions

An agent uses a foundation model to plan and act: it breaks a request into steps, calls tools, and uses the results.

User: "Where's my order A17, and can you change the delivery address?"

Agent:
  1. Calls getOrderStatus(orderId=A17)        -> "in warehouse"
  2. Checks policy in the Knowledge Base      -> "address changes allowed before dispatch"
  3. Calls updateAddress(orderId=A17, ...)    -> success
  4. Responds with confirmation

For running agents in production at scale — with any framework — Amazon Bedrock AgentCore provides managed runtime, memory, identity, gateway, and observability services.

Watch out: An agent with tools can do things. Give its Lambda functions least-privilege IAM roles, validate every parameter, require confirmation for consequential actions, and never let the model alone decide authorization.


Bedrock Guardrails

Guardrails apply safety and privacy policies to model inputs and outputs:

Attach a guardrail to model invocations, Knowledge Base queries, and agents — or call the ApplyGuardrail API to check any text, even from models outside Bedrock.


Amazon SageMaker AI

Amazon SageMaker AI is the platform for building, training, and deploying your own ML models:

When to use SageMaker


Ready-made AI services

No ML expertise needed — just an API call.

Amazon Textract

Extracts text, forms (key-value pairs), and tables from scanned documents and PDFs. Queries let you ask for specific fields — “What is the invoice total?” — and specialized APIs handle invoices, receipts, and identity documents.

Amazon Comprehend

Natural language processing for text:

Amazon Rekognition

Image and video analysis: labels (objects and scenes), text in images, content moderation, face detection and comparison, and custom labels for your own categories.

Amazon Transcribe

Speech to text — batch and streaming — with speaker identification, custom vocabularies, automatic language identification, and PII redaction. Call analytics adds sentiment and conversation insights for contact centers.

Amazon Translate

Neural machine translation across many languages, with custom terminology for product names and domain terms, and batch translation of documents.

Combining them

Support call recording (S3)
  -> Transcribe (speech to text, PII redacted)
  -> Comprehend (sentiment, entities)
  -> Bedrock (summary + suggested follow-up)
  -> stored with the ticket

Each step is one managed service — and the pipeline is orchestrated with Step Functions (Phase 9).


Security and cost essentials


Common mistakes


Key takeaways


Quick self-check

Test yourself before moving on:

  1. You need to extract totals and line items from scanned invoices. Which service?
  2. Which Bedrock API returns an answer with citations from a Knowledge Base?
  3. Which Guardrails feature helps detect hallucinated answers in RAG?
  4. When would you choose SageMaker over Bedrock?

Answers

  1. Amazon Textract (with the invoice/expense analysis API).
  2. RetrieveAndGenerate.
  3. Contextual grounding checks.
  4. To train, fine-tune, or host your own models — like tabular prediction on your data, or open-weight models with full control.

What’s next

In Part 3, the Phase 11 lab: build a retrieval-augmented generation app that reads documents from S3, indexes them with a Bedrock Knowledge Base, and answers questions with citations — protected by Guardrails and least-privilege IAM.

Which AWS AI service has saved your team the most time? Tell me in the comments.


Share this article

LinkedIn post draft