aws services

AWS Services Explained: EC2, S3, Lambda, and More

If you are stepping into the world of cloud computing, it feels a bit like walking into a massive, futuristic supermarket. There are aisles stretching as far as the eye can see, filled with tools and gadgets you didn’t even know existed. AWS Services (Amazon Web Services) is that supermarket. It’s the biggest player in the cloud game, and for good reason.

But here’s the problem: AWS has over 200 services.

If you try to learn them all at once, your brain might explode. You don’t need to know every single nut and bolt to build something incredible. You just need to know the essentials—the heavy lifters, the everyday tools, and the foundations.

We will categorize them logically so you can see how they fit together. Let’s dive in.


On This Page

1. Compute Services: The Muscle

Imagine you want to bake a cake. You need a kitchen, right? In the cloud world, “Compute” is that kitchen. It’s the processing power that actually runs your applications, executes your code, and does the heavy lifting.

AWS EC2 (Elastic Compute Cloud)

If you’ve heard of one AWS service, it’s probably this one. EC2 is the bread and butter of AWS.

Think of EC2 as renting a virtual computer in the cloud. It looks and acts exactly like the laptop or desktop you are using right now, except it sits in one of Amazon’s massive data centers. You can choose what operating system it runs (Windows, Linux, Ubuntu), how much memory it has, and how fast the processor is.

  • Why is it useful? It gives you total control. You can install whatever software you want on it.
  • Real-world example: Let’s say you have a small e-commerce website. You rent an EC2 instance (that’s what they call one virtual server), install your web server software (like Apache or Nginx), and host your site there.
  • The “Elastic” part: The beauty is that if your site goes viral on Black Friday, you can instantly “scale up” and rent a more powerful server. Or, you can rent 10 smaller servers to handle the traffic. When the rush is over, you turn them off and stop paying.

AWS Lambda

While EC2 is like renting a whole apartment, Lambda is like hiring a task rabbit who only does specific jobs and charges you by the second. This is what we call Serverless Computing.

With Lambda, you don’t manage a server at all. You just upload your code (Python, Node.js, Java, etc.) and tell AWS when to run it.

  • How it works: You define a “trigger.” Maybe a user uploads a photo to your app.
  • The Magic: That upload triggers your Lambda function. Your code wakes up, resizes the photo to make a thumbnail, saves it, and goes to sleep.
  • Cost: You pay only for the milliseconds your code runs. If no one uploads photos, you pay $0.
  • Real-world example: A chatbot. The bot sits idle until someone messages it. The message triggers a Lambda function to process the text and figure out a reply.

AWS ECS (Elastic Container Service) & AWS Fargate

These two often go hand-in-hand, but let’s clarify them.

In modern development, we love “Containers.” Think of a container like a lunchbox. It contains your application and everything it needs to run (libraries, code, settings) in one neat package. This ensures that if it runs on your laptop, it will run exactly the same on the server.

  • ECS: This is the “orchestrator.” It’s the manager that tells your containers where to run. It manages the scheduling.
  • Fargate: This is the “easy mode.” Normally, with ECS, you still have to manage the underlying servers (EC2 instances) that the containers sit on. With Fargate, you don’t even see the servers. You just say, “Here is my container, give it 2GB of memory,” and AWS handles the rest. It’s serverless containers.

AWS Elastic Beanstalk

If EC2 is the raw ingredients and Lambda is the quick task, Elastic Beanstalk is the microwave dinner. It’s a Platform as a Service (PaaS).

You don’t want to worry about servers, security patches, or load balancing? You just want to upload your code and have it run? Elastic Beanstalk is for you.

  • How it works: You upload your application file. Beanstalk automatically provisions the right EC2 instances, sets up the network, and launches your app. It handles the heavy lifting of infrastructure, while you focus purely on code.

Quick Comparison: Compute Services

ServiceAnalogyBest ForManagement Level
EC2Renting a ServerTotal control, legacy apps, complex setupsHigh (You manage the OS)
LambdaPay-per-use TaskEvent-driven tasks, sporadic workloadsLow (No servers to manage)
ECS/FargateShipping ContainersMicroservices, Docker appsMedium (Containers)
BeanstalkManaged AutopilotDevelopers who want to deploy code fastLow (AWS manages infrastructure)

2. Storage Services: The Warehouse

Now that we have the muscle (Compute) to do the work, we need a place to keep all our files, photos, and backups. AWS has several options depending on how quickly you need to access your data.

Amazon S3 (Simple Storage Service)

If there is a “celebrity” in the AWS storage world, it’s S3.

Think of S3 as an infinite basement or a cloud hard drive. It stores “objects,” which are basically files (photos, videos, documents, backups).

Key Features:

  • Durability: It is designed to never lose your data. It saves copies across multiple facilities automatically.
  • Scalability: You can store 1 file or 1 billion files. It doesn’t matter.
  • Buckets: You organize files into “Buckets.” Think of a bucket as a folder on your desktop.

Real-world example: Netflix uses S3 to store all their movies and TV shows. When you hit play, they stream the video directly from S3 to your living room.

    Storage Tiers:S3 isn’t just one thing. It has tiers.

    • S3 Standard: For stuff you use all the time.
    • S3 Glacier: For stuff you almost never touch (like 10-year-old tax records). It’s super cheap but takes a few hours to retrieve.

    Amazon EBS (Elastic Block Store)

    Remember EC2 (the virtual computer)? When you buy an EC2 instance, the hard drive inside it is temporary. If you turn the server off, the files on that internal drive are wiped.

    EBS is like a detachable USB hard drive that you plug into your EC2 instance.

    • How it works: You create an EBS volume and attach it to your server. Even if you stop the server, the EBS volume keeps your data safe.
    • Use case: Installing the operating system or database files that need to persist even if the server restarts.

    Amazon EFS (Elastic File System)

    While EBS connects to one server, EFS is like a shared network drive.

    • Analogy: Think of a Google Drive that multiple computers can access at the exact same time.
    • Use case: If you have 10 web servers (EC2) and they all need to display the same user-uploaded images, you would use EFS. All 10 servers connect to the EFS drive and read/write to it simultaneously.

    3. Database Services: The Brain’s Filing Cabinet

    Most applications need to remember things. They need to remember users, orders, products, and comments. This is where databases come in. AWS offers managed databases, meaning they handle the backups, patches, and updates so you don’t have to.

    Amazon RDS (Relational Database Service)

    RDS is for traditional, structured data. This is the classic SQL (Structured Query Language) database.

    It supports popular engines like MySQL, PostgreSQL, Oracle, and SQL Server.

    • The Setup: You click a few buttons to launch a database. AWS sets up the database software on a server, manages the hardware, and performs automatic backups.
    • Read Replicas: If your website has a lot of readers but not many writers, RDS can create “Read Replicas.” These are copies of your database that handle only read traffic (like viewing a profile), taking the load off the main database.
    • Multi-AZ: AWS automatically copies your data to a different data center. If your primary center burns down, your database instantly fails over to the backup without you doing anything.

    Amazon DynamoDB

    While RDS is for structured data (rows and columns), DynamoDB is a NoSQL database. It is the speed demon of the database world.

    • Structure: It doesn’t use tables with rows and columns in the traditional sense. It uses “Key-Value” pairs. Think of it like a dictionary where you look up a word (Key) to get the definition (Value).
    • Performance: It is incredibly fast and can handle massive amounts of requests per second.
    • Scalability: It scales horizontally. If you need more power, AWS just adds more storage partitions behind the scenes. It never goes down.
    • Real-world example: Tinder and Snapchat use DynamoDB because they need to swipe through millions of user profiles instantly with zero latency.

    Amazon ElastiCache

    Speed is everything. If your database is slow, your app feels slow.

    ElastiCache is like a sticky note for your data.

    Let’s say a user requests the “Top 10 News Articles.” The database takes 2 seconds to find them. That’s slow. Instead, your app checks ElastiCache (which lives in the computer’s memory, or RAM).

    The Process:

    1. Check ElastiCache: Is the data there? Yes? Return it in milliseconds.
    2. If no, ask the database (RDS or DynamoDB), get the data, save a copy in ElastiCache, and then return it.
    3. Next time, it’s in the cache!

    4. Networking Services: The Roads and Traffic Control

    Having a great car (Compute) and a great warehouse (Storage) is useless if there are no roads to connect them. Networking is about how your data moves and how people find your application.

    Amazon VPC (Virtual Private Cloud)

    This is arguably the most critical security service in AWS.

    Think of AWS as a giant public internet space. A VPC is your private gated community inside that space.

    • Isolation: When you create a VPC, you get your own private network slice. You have your own IP address range.
    • Security: You can decide who gets in and who gets out. You can put your databases in private subnets (hidden rooms) that have no internet access, making them unhackable from the outside world. Only your web servers (which are in public subnets) can talk to them.
    • Real-world analogy: It’s like your house. You have a fence (VPC). You might have a mailbox in the front yard (Public Subnet) for the mailman to leave packages, but you keep your valuables in the bedroom (Private Subnet) where strangers can’t go.

    Amazon Route 53

    Humans are bad at remembering numbers like 192.0.2.1. We are good at remembering names like google.com.

    Route 53 is the DNS (Domain Name System) service. It acts as the phonebook of the internet.

    • How it works: You buy a domain name. You use Route 53 to connect that name to your server’s IP address.
    • Health Checks: It’s smart, too. It constantly checks if your website is alive. If your main server in Virginia crashes, Route 53 can automatically redirect users to your backup server in California. They won’t even know anything happened.

    Amazon CloudFront

    Speed is the name of the game for user experience. If your server is in New York and your user is in Tokyo, the data has to travel across the ocean, causing lag.

    CloudFront is a CDN (Content Delivery Network).

    • The Mechanism: AWS has hundreds of “Edge Locations” (mini data centers) all over the world.
    • Caching: When a user in Tokyo requests your video, CloudFront routes them to the Edge Location in Tokyo. If the video is already there (cached), it plays instantly. If not, it fetches it from your main server, saves a copy in Tokyo, and then plays it.
    • Result: Fast load times for everyone, everywhere.

    Load Balancers (ALB & NLB)

    Imagine a popular nightclub. If everyone tries to squeeze through a single door, chaos ensues. You need bouncers at multiple doors directing people to less crowded areas.

    A Load Balancer does exactly that.

    • ALB (Application Load Balancer): Works at the “HTTP/HTTPS” level (web traffic). It looks at the content of the request. For example, it can send all requests for /images to one set of servers and /payments to another.
    • NLB (Network Load Balancer): Works at the “TCP” level. It’s super fast and handles millions of requests per second. It’s great for high-performance gaming or extreme financial data.

    5. Security & Identity: The Bouncers and Keys in AWS Services

    You cannot build in the cloud without locking your doors. AWS takes security seriously, and these tools are your locks and keys.

    AWS IAM (Identity and Access Management)

    If there is one service you must master before touching anything else, it is IAM.

    IAM is the “Grand Controller” of permissions. It decides who can do what.

    • Users: The actual people (you, me, employees) who log in.
    • Groups: Collections of users. E.g., “Developers Group,” “HR Group.”
    • Roles: Like hats a server puts on. For example, an EC2 server might put on a “Role” that allows it to read from S3.
    • Policies: These are JSON documents (basically text files) that define the rules.
      • Example Policy: “Allow User Bob to List files in Bucket A, but Deny him from Deleting them.”
    • Golden Rule: Never, ever use the “Root Account” (the main account holder login) for daily tasks. Always create individual IAM users with limited access.

    AWS KMS (Key Management Service)

    Encryption is vital. Encryption scrambles your data so it looks like gibberish to anyone without the key. KMS manages these keys for you.

    It’s like a high-tech safe deposit box. You don’t have to worry about generating complex math keys; KMS does it. You just ask KMS to “encrypt this data” or “decrypt this data,” and it handles the complex crypto behind the scenes.


    6. Management & Monitoring: The Control Room

    Once your application is live, you need to watch it. Things break. Traffic spikes. Servers run out of memory. You need to know what’s happening.

    Amazon CloudWatch

    Think of CloudWatch as the dashboard of your car, but for your AWS infrastructure.

    • Metrics: It collects data (CPU usage, disk space, network traffic) and draws graphs. You can see, “Oh, my server CPU is at 99%, that’s bad.”
    • Alarms: You can set rules. “If CPU is > 90% for 5 minutes, send me an email.”
    • Logs: Your applications write text logs (errors, user sign-ins). CloudWatch collects these logs so you can search through them to find bugs.

    AWS CloudTrail

    While CloudWatch tells you how your car is running, CloudTrail is the security camera recording who is driving it.

    It records API calls.

    • User A logged in.
    • User B deleted a server.
    • User C changed a password.

    If something goes wrong or gets hacked, CloudTrail is your forensic evidence. You can look back in time and see exactly who did what.


    7. The Architecture: Putting It All Together

    To really understand how these services fit, let’s visualize a common scenario: A scalable web application.

    1. The User: Types www.myapp.com.
    2. Route 53: Resolves the name to the IP address.
    3. CloudFront: Checks if it has the website images/files cached. If not, it passes the request deeper.
    4. Load Balancer (ALB): Receives the traffic and decides which EC2 instance is least busy. It sends the traffic there.
    5. EC2 Instances: Three web servers are running inside a VPC. They receive the request and process the code.
    6. Security (IAM): The EC2 servers use an IAM Role to get permission to access the database.
    7. Database: The servers talk to RDS (SQL) to fetch user profiles and DynamoDB to fetch session data.
    8. Storage: User-uploaded photos are sent directly to S3 for safe keeping.
    9. Monitoring: CloudWatch is tracking the CPU of all servers. If traffic spikes, it triggers an “Auto Scaling” policy to launch more EC2 servers automatically.

    This is the power of AWS. These services aren’t isolated islands; they are Lego blocks designed to click together perfectly.


    Example: A Simple Python Script for S3

    To give you a taste of how this works programmatically, here is a tiny Python script using the boto3 library (which is the standard AWS SDK for Python).

    This script uploads a file to an S3 bucket. Notice how simple it is—you don’t need to know the underlying hardware. You just import the library and say “upload.”

    import boto3
    
    # 1. Create an S3 client
    # This assumes your environment is already configured with credentials (via IAM Role or .aws file)
    s3 = boto3.client('s3')
    
    # Define variables
    bucket_name = 'my-awesome-app-storage'
    file_name = 'cat_photo.jpg'
    object_name = 'uploads/cat_photo.jpg'
    
    def upload_file(file_name, bucket, object_name=None):
        """Upload a file to an S3 bucket
    
        :param file_name: File to upload
        :param bucket: Bucket to upload to
        :param object_name: S3 object name. If not specified then file_name is used
        :return: True if file was uploaded, else False
        """
        # If S3 object_name was not specified, use file name
        if object_name is None:
            object_name = file_name
    
        try:
            # Upload the file
            response = s3.upload_file(file_name, bucket, object_name)
            print(f"Success! {file_name} has been uploaded to {bucket}.")
        except ClientError as e:
            print(f"Error uploading file: {e}")
            return False
        return True
    
    # Run the function
    if __name__ == '__main__':
        upload_file(file_name, bucket_name, object_name)

    What’s happening here?

    • We aren’t logging into a server via SSH.
    • We aren’t manually dragging and dropping files.
    • We are using code to talk to the S3 API. This is how modern applications are built—infrastructure as code.

    WrapUP

    AWS can be intimidating because of its sheer size. But remember, you don’t eat the whole supermarket in one day. You pick the ingredients you need for the meal you want to cook.

    Start with the basics:

    Master these, and you will have a solid foundation to build anything from a simple blog to a global enterprise platform. The beauty of the cloud is that you don’t have to predict the future; you just have to be ready to scale when it arrives. These tools give you that power.


    FAQs

    If I’m just starting a small website, should I use EC2 or Lambda?

    Think about your website’s behavior. If your website needs to be running 24/7 and people are visiting it constantly, EC2 is usually the better choice. It’s like renting a house; it’s always there, waiting for you.

    On the other hand, if your website is quiet most of the time but bursts into activity occasionally (like a survey form that only gets filled out once a week), go with Lambda. You’ll save money because you only pay for the few seconds it takes to process the form data, rather than paying for a server that sits idle doing nothing.

    What’s the real difference between storing files on S3 versus EBS?

    It’s all about accessibility. Amazon S3 is like a massive cloud garage or a Dropbox folder. You can access your files from anywhere, and it’s perfect for storing backups, images, or videos.

    Amazon EBS (Elastic Block Store) is like the internal hard drive inside your computer. It lives inside or attached specifically to one single EC2 server. If you turn that server off, the EBS volume stays attached to it (unless you move it). You use EBS for things that need to act like a traditional hard drive for an operating system or software, whereas S3 is for general file storage.

    Why would I choose RDS over DynamoDB?

    It depends on how your data is organized. If your data looks like an Excel spreadsheet with rows and columns (e.g., a list of customers with addresses and phone numbers) and you need to run complex queries (like “Show me everyone who lives in New York”), stick with Amazon RDS. It’s the standard, relational database.

    Choose DynamoDB if you need raw speed and flexibility. It doesn’t use rows and columns; it just stores data however you throw it at it. It’s perfect for things like shopping carts or user session data where you just need to grab a specific piece of info instantly without complex relationships.

    Do I really need to set up a VPC? Can’t I just put everything on the open internet?

    Technically, you could, but you really, really shouldn’t. A VPC (Virtual Private Cloud) is your private, gated neighborhood inside the AWS cloud. If you put your database directly on the open internet, hackers will try to break into it within minutes.

    By using a VPC, you can hide your database in a private backroom where it has no internet address. Only your web servers (which live in the front yard of the VPC) can talk to it. It’s the single most important step for keeping your data safe.

    Is AWS actually expensive, or is it just cheap to start?

    AWS is generally a “pay-as-you-go” model, which means it’s cheap to start but can get expensive if you aren’t paying attention. It’s like leaving the lights on in your house; if you leave a massive server running all month, you’ll get a bill at the end.

    The beauty is that you can stop the costs anytime. If you are done for the day, you can turn off your EC2 instances and stop paying for those compute hours. Storage (like S3) costs money as long as the data is there, but it’s very cheap. The key is to monitor your usage using CloudWatch so you don’t get surprised.

    What is the easiest way to deploy my code without learning all this server stuff?

    If you want to focus purely on writing code and don’t want to deal with operating systems, networking, or firewalls, use AWS Elastic Beanstalk. It handles all the “plumbing” for you. You just upload your code file, and Beanstalk automatically provisions the servers, sets up the load balancer, and launches your site. It’s the fastest path from “Code” to “Live Website.”

    Why do people talk so much about “Regions”?

    AWS has data centers all over the world—North America, Europe, Asia, etc. These are grouped into Regions. The region you choose matters for two reasons: Speed and Law.

    For speed, you want to pick the region closest to your users. If your users are in London, hosting your app in a region in Singapore will make the site feel slow for them. For laws, some countries require that certain data (like health records) never physically leave that country’s borders. The Region feature helps you control where your data physically lives.

    How does Route 53 help if my website crashes?

    Route 53 is a smart phonebook. It doesn’t just look up addresses; it can check the health of your website. You can set it up so that it checks your server every 30 seconds. If your server in Virginia crashes, Route 53 will realize it’s “sick” and automatically start sending your users to a backup server in California. This happens in seconds, often before you even realize there is a problem.

    What happens if I accidentally delete a critical file in S3?

    Don’t panic—yet. Amazon S3 has a feature called “Versioning.” If you turn it on, it doesn’t just overwrite a file when you save a new one; it keeps the old version, too. So if you accidentally delete logo.jpg or overwrite it with a bad picture, you can go into the S3 console and “restore” the previous version. It works like an unlimited “Undo” button for your files.

    Is “Serverless” (Lambda) actually server-free?

    The term “Serverless” is a bit of a marketing trick. There are still servers involved; Amazon has thousands of them. The difference is that you don’t see them, manage them, or pay for them directly when they are idle.

    When you use Lambda, you are renting just the execution of your code. You don’t have to install Windows or Linux, you don’t patch security holes, and you don’t worry about hard drives filling up. AWS manages the servers, and you just provide the code. It’s “server-less” from your perspective.

    Nishant G.

    Nishant G.

    Systems Engineer
    Active since Apr 2024
    242 Posts

    A systems engineer focused on optimizing performance and maintaining reliable infrastructure. Specializes in solving complex technical challenges, implementing automation to improve efficiency, and building secure, scalable systems that support smooth and consistent operations.

    You May Also Like

    More From Author

    5 1 vote
    Would You Like to Rate US
    Subscribe
    Notify of
    0 Comments
    Oldest
    Newest Most Voted
    Inline Feedbacks
    View all comments