Selecting the Right Level of AI and ML Service
This lesson explains how to pick the right level of AI service for a requirement and fit it into a secure, scalable architecture, using the most managed service that meets the need.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish pre-trained AI services, Amazon Bedrock and SageMaker AI.
- Describe private access, data protection and cost considerations for AI workloads.
- Describe how managed services automate document processing.
Three levels of service
AWS offers AI and machine learning at three levels, from least to most effort. Pre-trained AI services perform common tasks through an API, with no model to build. Rekognition analyses images and video, Textract extracts data from documents, and Comprehend analyses text. Transcribe, Translate and Polly handle speech and language, Lex builds chatbots, and Personalize provides recommendations. Generative AI services cover text generation, summarisation, assistants and agents over your own data. They include Amazon Bedrock, with foundation models, Knowledge Bases for retrieval-augmented generation, Agents and Guardrails, and Amazon Q. Amazon SageMaker AI is for building your own custom models on proprietary data, with training, tuning, hosting, pipelines and Feature Store. The following table summarises the levels.
| Level | Services | Choose when |
|---|---|---|
| Pre-trained AI services | Rekognition (images, video), Textract (documents), Comprehend (text), Transcribe, Translate, Polly, Lex (chatbots), Personalize (recommendations) | A common task with no need for your own model |
| Generative AI | Amazon Bedrock (foundation models, Knowledge Bases for retrieval-augmented generation, Agents, Guardrails), Amazon Q | Text generation, summarisation, assistants and agents over your data |
| Build your own | Amazon SageMaker AI (training, tuning, hosting, pipelines, Feature Store) | Custom models on proprietary data |
Architecture concerns
AI workloads raise the same architectural questions as any other, with some specific answers. For private access, Amazon Bedrock, SageMaker AI and most AI services offer interface VPC endpoints, so prompts and data need not cross the internet. For data protection, Bedrock does not use customer prompts or outputs to train its base models, and training data and model artifacts are encrypted with customer managed KMS keys. For governance, Bedrock Guardrails filter harmful content and personal data in prompts and responses, and model invocation logging records prompts and responses for audit.
The inference pattern follows the traffic: real-time endpoints for low latency, serverless inference for intermittent traffic, asynchronous inference for large payloads or long processing, and batch transform for scoring whole datasets offline. Cost follows the same pattern as compute: Spot training and Savings Plans for SageMaker AI, and on-demand or provisioned throughput for Bedrock, depending on how steady the demand is.
Automating invoice processing
A company receives 50,000 supplier invoices a month as PDFs and scans. Clerks retype them into the finance system. The goal is automation with minimal ML expertise. The architect chains managed services rather than training a model:
-
Start the workflow
Invoices land in S3; an EventBridge rule starts a Step Functions workflow.
-
Extract the data
Textract's AnalyzeExpense API extracts vendor, totals and line items from each document.
-
Review low-confidence fields
Low-confidence fields go to a human reviewer through a task-token approval step.
-
Check against the contract
A Bedrock model, grounded with the supplier master data through a Knowledge Base, flags invoices whose amounts or terms deviate from the contract.
-
Write to finance
Approved data is written to the finance system through its API.
Each step uses a managed service, the workflow keeps a human in the loop only where needed, and nothing requires the team to train or host a model.
When should a pre-trained AI service be chosen over building a model in SageMaker?
Show answer
When the service already does the task, such as extracting text or translating, because it needs no training data or ML expertise and is fastest to deliver.
Exam Tips
Remember for the exam
- Prefer pre-trained AI services for common tasks such as OCR, image labels and transcription.
- For generative AI over company data, use Amazon Bedrock with Knowledge Bases.
- For custom models on proprietary data, use SageMaker AI.
- For intermittent inference traffic, use SageMaker serverless inference; for offline scoring, batch transform.
- Keep AI traffic private with VPC interface endpoints and encrypt data with KMS.