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.
| Service | Role in an AI solution |
|---|---|
| Amazon S3 | The usual store for training data, knowledge base documents, model artefacts, batch inference input and output, and invocation logs |
| Amazon S3 Glacier | Low-cost archival storage for raw data, earlier training sets and logs retained for compliance |
| AWS Glue | Serverless data integration (extract, transform and load) and the Glue Data Catalog of schemas |
| AWS Glue DataBrew | Visual, no-code data cleaning and normalisation with more than 250 built-in transformations |
| Amazon EMR | Managed big data frameworks, such as Apache Spark, for large-scale data processing |
| AWS Lake Formation | A governed data lake with fine-grained access control |
| Amazon Redshift | A data warehouse for analytics; Bedrock Knowledge Bases can answer natural-language questions over its data |
| AWS Data Exchange | Finding and subscribing to third-party data sets |
Data services
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.
| Service | Typical use in AI applications |
|---|---|
| Amazon Aurora and Amazon RDS | Relational data; the PostgreSQL editions store and search vectors with pgvector |
| Amazon DynamoDB | Low-latency key-value storage, for example for conversation history and session state |
| Amazon ElastiCache | In-memory caching of frequent responses, and low-latency vector search |
| Amazon DocumentDB | JSON document storage with vector search |
| Amazon Neptune | Graph data, and GraphRAG through Neptune Analytics |
Which database?
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.
| Service | Role |
|---|---|
| AWS Lambda | Serverless functions for application logic, agent tools and data processing |
| Amazon EC2 | Virtual servers, including GPU, Trainium and Inferentia instances for self-managed models |
| Amazon ECS and Amazon EKS | Containerised applications and self-hosted models |
| Amazon CloudFront | Low-latency delivery of web applications and content worldwide |
| Amazon VPC | Private networks, with interface endpoints for private access to Bedrock and SageMaker AI |
| Amazon CloudWatch | Metrics, logs, alarms and dashboards for models and applications |
| AWS Secrets Manager | Storage and rotation of API keys and database credentials, so that they never appear in code or prompts |
| AWS Well-Architected Tool | Reviews of workloads against AWS best practices; the Well-Architected Framework includes Machine Learning and Generative AI lenses |
Operating AI applications
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.
Watching AI spending
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.
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.