AWS Builder Center

Getting Started with Generative AI on AWS: A Beginner’s Guide

Learn the basic concepts behind Generative AI and how AWS services such as Amazon Bedrock, S3, Lambda, and API Gateway can be combined to build simple AI applications.

Introduction

Generative AI has become an important part of modern software development. It can generate text, answer questions, summarize information, create content, and help developers build intelligent applications.
For beginners, understanding how different AWS services work together is a good first step toward building Generative AI applications.

What is Generative AI?

Generative AI is a type of artificial intelligence that can create new content based on the information and instructions it receives.
For example, it can:
  • Generate text
  • Summarize documents
  • Answer questions
  • Generate code
  • Create images
  • Assist users through chatbots
Large Language Models (LLMs) are commonly used for text-based Generative AI applications.

Amazon Bedrock

Amazon Bedrock provides access to foundation models through AWS APIs.
Instead of building and training a large AI model from scratch, developers can use foundation models available through Bedrock and integrate them into their applications.
A simple application could send a user's question to a foundation model and return the generated response.

Using Amazon S3

Amazon S3 can be used to store documents, files, images, and other application data.
For example, an AI study assistant could store:
  • PDF notes
  • Course materials
  • Text documents
  • Assignments
The application can then use these documents as a source of information.

Using AWS Lambda

AWS Lambda allows developers to run backend code without managing servers.
For an AI application, Lambda could receive a user's request, process the request, call Amazon Bedrock, and return the AI-generated response.
This makes it easier to build serverless AI applications.

Using API Gateway

Amazon API Gateway can provide an API between the frontend application and backend services.
A simple flow could be:
User → Web Application → API Gateway → Lambda → Amazon Bedrock → Response
This allows the frontend and backend to communicate using APIs.

What is RAG?

One limitation of a general AI model is that it may not know information from a private collection of documents.
Retrieval-Augmented Generation (RAG) helps solve this problem.
A simple RAG workflow is:
  1. The user asks a question.
  1. The application searches for relevant information.
  1. The relevant information is provided to the AI model.
  1. The model generates an answer using that information.
This can be useful for applications such as:
  • AI study assistants
  • Company knowledge assistants
  • Document question-answering systems
  • Customer support applications

From RAG to AI Agents

AI agents can go beyond simply answering questions.
An AI agent can understand a goal, use available tools, retrieve information, and perform multiple steps to complete a task.
For example, a student could ask:
"Find my study materials, summarize them, and create a study plan."
An AI agent could break this into multiple steps:
Understand the goal ↓ Find relevant documents ↓ Retrieve information ↓ Summarize the information ↓ Create a study plan ↓ Return the result

Conclusion

Generative AI applications are built using more than just an AI model.
AWS services such as Amazon Bedrock, Amazon S3, AWS Lambda, and Amazon API Gateway can work together to create useful AI applications.
For beginners, starting with a simple application and gradually learning concepts such as RAG, APIs, security, and AI agents is a practical way to understand Generative AI on AWS.
The most important lesson is to start small, experiment with the available AWS services, and learn by building.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article