AWS Builder Center

AWS for Beginners: Understanding EC2, S3, IAM, and Lambda Through One Simple Application

A beginner-friendly guide to AWS covering EC2, S3, IAM, and Lambda through a simple real-world application. Learn what each service does, how they work together, and a practical roadmap for starting your AWS cloud journey.

AWS for Beginners: Understanding EC2, S3, IAM, and Lambda Through One Simple Application

Cloud computing can feel overwhelming when you first start learning AWS. There are hundreds of services, and it is difficult to know which ones you should learn first.
Instead of trying to memorize every AWS service, beginners can start by understanding a few fundamental services and, more importantly, how they work together.
In this article, we will understand four important AWS services:
  • Amazon EC2 — Compute
  • Amazon S3 — Storage
  • AWS IAM — Security and access control
  • AWS Lambda — Serverless compute
We will use a simple application scenario to understand where each service fits.

1. What is AWS?

Amazon Web Services (AWS) is a cloud platform that provides services for computing, storage, databases, networking, security, analytics, and many other workloads.
Traditionally, if you wanted to host an application, you might need to purchase and maintain a physical server.
With AWS, you can use cloud resources when you need them without owning the physical infrastructure yourself.
Think of AWS as a huge collection of building blocks.
Instead of building your entire infrastructure from scratch, you select the services you need and connect them together.



2. Amazon EC2 — Your Virtual Computer

Amazon Elastic Compute Cloud (Amazon EC2) allows you to create virtual servers in the AWS Cloud.
You can think of an EC2 instance as a computer that exists in the cloud.
For example, imagine you are building a website.
Your application needs somewhere to run.
You could create an EC2 instance and deploy your application on it.
A simplified architecture could look like this:
User → Internet → EC2 → Application
EC2 gives you control over the computing environment, including the operating system and the software running on the instance.

When would you use EC2?

EC2 is useful when you need control over your computing environment.
Examples include:
  • Hosting web applications
  • Running backend applications
  • Running development environments
  • Hosting APIs
  • Running custom software
The important beginner concept is:
EC2 = A virtual server in the cloud



3. Amazon S3 — Store Your Files

Applications usually need to store files.
For example:
  • Images
  • Videos
  • PDFs
  • Backups
  • Logs
  • Datasets
  • Static website files
Amazon Simple Storage Service (Amazon S3) provides object storage for these types of files.
Instead of storing everything on your application's server, you can store objects in an S3 bucket.
For example:
User uploads an image → Application → S3 bucket
Later, the application can retrieve the image from S3.
S3 is designed to store and retrieve large amounts of data from anywhere.

A simple way to remember it:

S3 = Cloud storage for objects/files
For beginners, understanding the concept of a bucket is important.
A bucket is a container where you store objects.
For example:
my-website-bucket
│
├── images/
│ ├── profile.jpg
│ └── banner.png
│
├── documents/
│ └── resume.pdf
│
└── backups/
└── database-backup.zip




4. AWS IAM — Who Is Allowed to Do What?

Now imagine you have an application running on EC2 and files stored in S3.
Should every user have permission to access everything?
Obviously not.
This is where AWS Identity and Access Management (IAM) becomes important.
IAM helps control access to AWS resources.
For example, you might want:
Developer → Can view S3 files
Application → Can upload files to S3
Administrator → Can manage AWS resources
Instead of giving everyone complete access, you can grant only the permissions they actually need.
This is known as the principle of least privilege.
IAM also supports security features such as multi-factor authentication (MFA).

Remember:

IAM = Who can access what, and what can they do?
This is one of the most important concepts to understand early in your AWS journey.



5. AWS Lambda — Run Code Without Managing Servers

Now let's look at a different approach to running code.
With EC2, you create and manage a virtual server.
But what if you only need to run a small piece of code when something happens?
That's where AWS Lambda comes in.
Lambda is a serverless compute service that runs your code in response to events while AWS manages the underlying compute resources.
For example:
User uploads image → S3 event → Lambda → Process image
You don't need to continuously run a server just to wait for an image upload.
Lambda can execute your function when the event occurs.
Lambda can be triggered by events from AWS services and can be used for APIs, file processing, automation, and many other workloads.

Remember:

Lambda = Run code in response to events without managing servers



6. Putting Everything Together

Let's imagine we are building a simple online document management application.
A user uploads a PDF.
Our architecture could look like this:
USER
│
▼
APPLICATION
│
┌────────┴────────┐
▼ ▼
EC2 S3
Application Server PDF Storage
│
▼
Lambda
File Processing

IAM works across the architecture to control which users and services are allowed to access these resources.
For example:
  1. The user uploads a PDF.
  1. The application running on EC2 receives the request.
  1. The PDF is stored in an S3 bucket.
  1. The S3 event triggers a Lambda function.
  1. Lambda processes the file.
  1. IAM permissions control which resources the application and Lambda function can access.
This simple example demonstrates how multiple AWS services can work together instead of existing as isolated services.



7. EC2 vs Lambda

One common question beginners have is:
"If Lambda can run code without servers, why do we need EC2?"
The answer is that they solve different problems.
EC2
Lambda
Virtual server
Serverless compute
You manage the server environment
AWS manages the underlying infrastructure
Suitable for long-running applications
Suitable for event-driven workloads
More control
Less infrastructure management
You provision compute capacity
Automatically scales with requests
Neither service is universally better.
The correct choice depends on your application's requirements.



8. The AWS Concepts Beginners Should Learn First

You don't need to learn hundreds of AWS services immediately.
Start with these concepts:

Compute

Learn:
  • EC2
  • Lambda

Storage

Learn:
  • S3

Security

Learn:
  • IAM
  • Roles
  • Policies
  • MFA
  • Least privilege

Networking

After understanding the basics, move to:
  • VPC
  • Subnets
  • Security Groups
  • Internet Gateway

Databases

Then learn:
  • Amazon RDS
  • DynamoDB
This gives you a much stronger foundation than simply memorizing AWS service names.



9. A Simple Learning Path for Beginners

If you are completely new to AWS, try learning in this order:
Step 1: Understand basic cloud computing concepts
Step 2: Learn AWS Regions and Availability Zones
Step 3: Learn IAM and basic AWS security
Step 4: Create and understand an EC2 instance
Step 5: Create an S3 bucket and upload objects
Step 6: Learn how IAM permissions work with S3
Step 7: Create a simple Lambda function
Step 8: Connect S3 with Lambda
Step 9: Learn basic networking with VPC
Step 10: Build a small project using multiple services
AWS provides beginner-oriented getting-started resources and hands-on tutorials for learning these concepts through practice.



10. Build Instead of Just Watching Tutorials

The best way to learn AWS is to actually use the services.
A simple beginner project could be:

"Serverless File Processing System"

Build a system where:
User uploads a file → S3 → Lambda → Process file → Store result
Through this one project, you can learn:
  • S3
  • Lambda
  • IAM
  • Event-driven architecture
  • Cloud storage
  • Permissions
  • Basic monitoring
AWS also provides a beginner Lambda tutorial where you create, invoke, test, and clean up a function using the AWS console.



Final Thoughts

AWS can look complicated when you first see the huge number of available services.
But you don't need to learn everything at once.
Start by understanding the fundamental building blocks:
EC2 → Compute
S3 → Storage
IAM → Security
Lambda → Serverless compute
Once you understand what each service does and how they work together, learning more AWS services becomes much easier.
The goal shouldn't be to memorize AWS services.
The goal should be to understand why a service is used, what problem it solves, and how it fits into an application's architecture.
Start small. Build something. Break it. Fix it. And keep experimenting.
That's where AWS really starts to make sense.

Useful AWS Resources

  • AWS Getting Started
  • AWS Documentation
  • AWS Hands-on Tutorials
  • AWS Lambda Getting Started
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