Lesson 6 of 6 The ML Development Lifecycle and MLOps

Identifying Supporting AWS Services for AI Workloads

This lesson explains the AWS services beyond Amazon Bedrock and SageMaker AI that AI applications rely on: to store and prepare data, run application code, deliver responses, protect credentials, control cost and operate reliably. Questions often include them as part of a solution or as distractors.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the data storage and preparation services used by AI solutions.
  • Identify the databases that store application data, vectors and session state.
  • Identify the compute, delivery and operations services that AI applications use.
  • Identify the tools that monitor and control the cost of AI workloads.

Data storage and preparation

AI solutions rest on general data services. Amazon S3 is the usual store for almost everything: training data, documents for knowledge bases, trained model files, the input and output of batch inference, and invocation logs. S3 Glacier archives raw data, older training sets and logs that must be kept for compliance, at low cost. AWS Glue extracts, transforms and loads data without servers and keeps a catalogue of data schemas, and AWS Glue DataBrew cleans and normalises data visually without code.

Amazon EMR runs big data frameworks such as Apache Spark for large-scale processing. AWS Lake Formation builds a governed data lake with fine-grained access control. Amazon Redshift is a data warehouse, and Bedrock Knowledge Bases can answer questions in natural language over its data. AWS Data Exchange lets you find and subscribe to third-party data sets. The following table summarises the services.

ServiceRole in an AI solution
Amazon S3The usual store for training data, knowledge base documents, model artefacts, batch inference input and output, and invocation logs
Amazon S3 GlacierLow-cost archival storage for raw data, earlier training sets and logs retained for compliance
AWS GlueServerless data integration (extract, transform and load) and the Glue Data Catalog of schemas
AWS Glue DataBrewVisual, no-code data cleaning and normalisation with more than 250 built-in transformations
Amazon EMRManaged big data frameworks, such as Apache Spark, for large-scale data processing
AWS Lake FormationA governed data lake with fine-grained access control
Amazon RedshiftA data warehouse for analytics; Bedrock Knowledge Bases can answer natural-language questions over its data
AWS Data ExchangeFinding and subscribing to third-party data sets
Match the pairs

Data services

Exam skills 1.3.4

Match each data requirement with the AWS service that meets it.

Log in to try this activity Interactive activities are free with an account.

Databases

Databases hold the application data, vectors and session state that AI applications use. Amazon Aurora and Amazon RDS store relational data, and their PostgreSQL editions can store and search vectors with the pgvector extension, so embeddings can sit beside existing business data. Amazon DynamoDB provides fast key-value storage, for example for a chatbot's conversation history and session state. Amazon ElastiCache caches frequent responses in memory and supports fast vector search. Amazon DocumentDB stores JSON documents with vector search, and Amazon Neptune stores graph data and supports GraphRAG through Neptune Analytics. The following table summarises the services.

ServiceTypical use in AI applications
Amazon Aurora and Amazon RDSRelational data; the PostgreSQL editions store and search vectors with pgvector
Amazon DynamoDBLow-latency key-value storage, for example for conversation history and session state
Amazon ElastiCacheIn-memory caching of frequent responses, and low-latency vector search
Amazon DocumentDBJSON document storage with vector search
Amazon NeptuneGraph data, and GraphRAG through Neptune Analytics
Scenario questions

Which database?

Exam skills 1.3.4 · 3.1.4

Choose the database for each part of an AI application.

Log in to try this activity Interactive activities are free with an account.

Compute, delivery and operations

AI applications also rely on general-purpose services. For compute, AWS Lambda runs serverless functions for application logic, the tools that agents call and data processing. Amazon EC2 provides virtual servers, including GPU, Trainium and Inferentia instances for running models yourself, and Amazon ECS and Amazon EKS run containerised applications and self-hosted models. Amazon CloudFront delivers web applications quickly to users worldwide.

For operations, Amazon VPC provides private networks, with interface endpoints for private access to Bedrock and SageMaker AI. Amazon CloudWatch provides metrics, logs, alarms and dashboards. AWS Secrets Manager stores and rotates API keys and database credentials, so they never appear in code or prompts. The AWS Well-Architected Tool reviews workloads against best practices, including the Machine Learning and Generative AI lenses. The following table summarises the services.

ServiceRole
AWS LambdaServerless functions for application logic, agent tools and data processing
Amazon EC2Virtual servers, including GPU, Trainium and Inferentia instances for self-managed models
Amazon ECS and Amazon EKSContainerised applications and self-hosted models
Amazon CloudFrontLow-latency delivery of web applications and content worldwide
Amazon VPCPrivate networks, with interface endpoints for private access to Bedrock and SageMaker AI
Amazon CloudWatchMetrics, logs, alarms and dashboards for models and applications
AWS Secrets ManagerStorage and rotation of API keys and database credentials, so that they never appear in code or prompts
AWS Well-Architected ToolReviews of workloads against AWS best practices; the Well-Architected Framework includes Machine Learning and Generative AI lenses
Match the pairs

Operating AI applications

Exam skills 1.3.4

Match each operational need with the AWS service that meets it.

Log in to try this activity Interactive activities are free with an account.

Managing cost

The cost of AI workloads must be monitored and controlled. The following list describes the AWS tools and practices that support this.

  • AWS Cost Explorer analyses spending over time, for example Amazon Bedrock costs by model or by tagged application.
  • AWS Budgets sets cost or usage thresholds and sends alerts, or runs actions, when they are exceeded.
  • Tagging resources by project or team allows AI costs to be attributed and reviewed.
Scenario questions

Watching AI spending

Exam skills 1.3.4 · 2.3.4

Choose the cost tool for each request.

Log in to try this activity Interactive activities are free with an account.
Worked example

A company stores 300,000 support articles in Amazon S3 for a Bedrock knowledge base. It must keep conversation history for each user session, store the third-party API key that its agent uses, and be alerted if monthly Bedrock spending exceeds $5,000. Which services meet these needs?

Amazon DynamoDB stores the session history with low latency, AWS Secrets Manager stores the API key so that it never appears in code or prompts, and AWS Budgets sends an alert when the spending threshold is reached. AWS Cost Explorer then shows which models and applications account for the cost.

Check yourself

Where is training data for ML on AWS usually stored?

Show answer

In Amazon S3, which is durable and low-cost and works with SageMaker AI, AWS Glue and Amazon EMR.

Exam Tips

Remember for the exam

  • Amazon S3 is the usual store for training data, knowledge base documents and batch inference files.
  • AWS Glue DataBrew provides no-code data preparation; AWS Glue provides ETL and the Data Catalog.
  • AWS Lake Formation provides fine-grained access control for data lakes.
  • Store API keys and credentials in AWS Secrets Manager, never in prompts or code.
  • Use AWS Budgets for spending alerts and AWS Cost Explorer to analyse costs.
  • The AWS Well-Architected Tool reviews workloads against best practices.