Skip to content
FullStackDostFullStackDostLearn · Build · Level Up
  • All Courses
  • Updates
  • My Account
  • All Courses
  • Updates
  • My Account
  • Home
  • Full Stack Development

Cloud Services

Curriculum

  • 3 Sections
  • 38 Lessons
  • 6 Weeks
Expand all sectionsCollapse all sections
  • Amazon Web Services (AWS)
    Amazon Web Services (AWS) is a comprehensive and widely used cloud computing platform provided by Amazon.com. It offers a broad range of cloud services, including computing power, storage options, networking capabilities, databases, machine learning, artificial intelligence, analytics, security, and more.
    8
    • 1.1
      Compute Services (EC2): Your First Virtual Server
      45 Minutes
    • 1.2
      Storage Services (S3)
      35 Minutes
    • 1.3
      Database Services
      40 Minutes
    • 1.4
      Networking Services
      40 Minutes
    • 1.5
      Machine Learning and AI Services
      60 Minutes
    • 1.6
      AWS Analytics Services: Unlocking Data Insights
      45 Minutes
    • 1.7
      Security and Identity Services
      50 Minutes
    • 1.8
      Developer Tools
      120 Minutes
  • Azure Cloud Services
    Azure, Microsoft's cloud computing platform, offers a wide range of services for building, deploying, and managing applications and services through Microsoft-managed data centers.
    18
    • 2.1
      Mastering Azure Compute Services: Your Cloud Application Engine
      40 Minutes
    • 2.2
      Networking Services
      120 Minutes
    • 2.3
      Networking Services
    • 2.4
      SQL Database
      60 Minutes
    • 2.5
      Storage Services
      40 Minutes
    • 2.6
      Database Services
      120 Minutes
    • 2.7
      Identity and Access Management
      120 Minutes
    • 2.8
      Security Services
      60 Minutes
    • 2.9
      Monitoring and Management
      80 Minutes
    • 2.10
      Development Tools
      50 Minutes
    • 2.11
      Azure AI & Machine Learning: Empowering Your Full-Stack Applications
      140 Minutes
    • 2.12
      Internet of Things (IoT)
      100 Minutes
    • 2.13
      Unlocking Insights: Analytics and Big Data in Azure
      120 Minutes
    • 2.14
      Developer Tools
      50 Minutes
    • 2.15
      Containers and Serverless Computing: Modernizing Your Azure Applications
      120 Minutes
    • 2.16
      Web and Mobile Services
      60 Minutes
    • 2.17
      Enterprise Integration
      100 Minutes
    • 2.18
      Blockchain Services on Azure: Building Decentralized Solutions
      140 Minutes
  • Google Cloud Platform (GCP)
    Google Cloud Platform (GCP) is a suite of cloud computing services offered by Google, covering various computing resources such as compute power, storage, databases, machine learning, networking, and more. GCP provides businesses and developers with a range of tools and services to build, deploy, and manage applications and services on Google's infrastructure.
    12
    • 3.1
      Compute Services in Google Cloud Platform
      40 Minutes
    • 3.2
      Mastering Container Services on Google Cloud Platform (GCP)
      100 Minutes
    • 3.3
      Serverless Computing
      120 Minutes
    • 3.4
      Storage Services
      90 Minutes
    • 3.5
      Networking Services
      110 Minutes
    • 3.6
      GCP Big Data & Analytics Services: Unlocking Data Insights
      85 Minutes
    • 3.7
      Machine Learning and AI Services
      145 Minutes
    • 3.8
      Developer Tools
      120 Minutes
    • 3.9
      Identity and Access Management
      140 Minutes
    • 3.10
      Security Services
      150 Minutes
    • 3.11
      Internet of Things (IoT) Services
      120 Minutes
    • 3.12
      Monitoring and Management
      60 Minutes

Compute Services (EC2): Your First Virtual Server

Introduction: The Power of Virtual Servers

Namaste, future Full-Stack Developers! Welcome to a foundational lesson in cloud computing. Today, we’re unlocking the power of Amazon Elastic Compute Cloud (EC2) – the heart of AWS’s compute services. Imagine needing a powerful computer to run your applications, but without the hassle of buying, maintaining, or upgrading hardware. That’s exactly what EC2 offers: virtual servers in the cloud, ready to scale with your ambitions.

In this lesson, you’ll learn what EC2 is, why it’s indispensable for modern applications, and most importantly, how to launch and connect to your very own virtual server, setting the stage for deploying your full-stack projects.

What is Amazon EC2?

Amazon EC2 provides resizable compute capacity in the cloud. Think of it as renting a virtual computer (called an instance) from Amazon Web Services. You get to choose its operating system, processing power, memory, and storage, just like you would with a physical machine. The magic? You only pay for what you use, and you can scale up or down in minutes.

Why EC2 Matters for Full-Stack Developers

For full-stack developers, EC2 is your canvas in the cloud. It’s where your backend APIs run, your databases connect, and your frontend assets are served. It allows you to:

  • Deploy Applications Quickly: Spin up a server in minutes, not days or weeks.
  • Scale on Demand: Handle sudden spikes in traffic without manual intervention.
  • Experiment Freely: Test new ideas on powerful machines without significant upfront investment.
  • Control Your Environment: Choose your OS, install specific software, and configure it exactly as needed.

Key Concepts of EC2

Before we launch our first instance, let’s understand some core terminology:

1. EC2 Instances: Your Virtual Machines

An EC2 Instance is simply a virtual server. AWS offers a wide variety of instance types, each optimized for different workloads:

  • General Purpose: Balanced compute, memory, and networking (e.g., t2.micro, t3.large). Great for web servers and development environments.
  • Compute Optimized: High-performance processors (e.g., c5.xlarge). Ideal for compute-intensive applications.
  • Memory Optimized: Large amounts of RAM (e.g., r5.xlarge). Perfect for databases and in-memory caches.
  • Storage Optimized: High-speed local storage (e.g., i3.xlarge). For data warehousing and NoSQL databases.

You’ll also choose an Amazon Machine Image (AMI), which is a template containing the operating system (e.g., Amazon Linux, Ubuntu, Windows Server), application server, and any pre-installed software packages.

2. Pricing Models: Pay for What You Use

EC2 offers flexible pricing to suit various needs:

  • On-Demand: Pay by the hour or second, with no long-term commitment. Best for unpredictable workloads.
  • Reserved Instances (RIs): Significant discounts (up to 75%) for committing to a 1- or 3-year term. Ideal for stable, long-term workloads.
  • Spot Instances: Bid on unused EC2 capacity for up to 90% savings. Great for fault-tolerant applications that can handle interruptions.

3. Scalability: Auto Scaling

Auto Scaling automatically adjusts the number of EC2 instances in your application based on demand. If traffic increases, it launches more instances; if traffic decreases, it terminates them, ensuring optimal performance and cost efficiency.

4. Security: Security Groups and VPC

Security Groups act as virtual firewalls for your instances, controlling inbound and outbound traffic. You define rules (e.g., allow SSH on port 22 from your IP, allow HTTP on port 80 from anywhere). Instances run within a Virtual Private Cloud (VPC), which is your isolated network environment in AWS.

5. Storage: Amazon EBS

Amazon Elastic Block Store (EBS) provides persistent block storage volumes for use with EC2 instances. Think of them as network-attached hard drives that remain even if your instance is terminated.

Launching Your First EC2 Instance (Step-by-Step Guide)

Let’s get practical! We’ll launch a basic t2.micro (Free Tier eligible) instance running Amazon Linux 2, and then connect to it.

Step 1: Sign in to the AWS Management Console

Go to console.aws.amazon.com and sign in with your AWS account.

Step 2: Navigate to the EC2 Dashboard

In the AWS Console search bar, type “EC2” and select the EC2 service. This will take you to the EC2 Dashboard.

Step 3: Launch an Instance

On the EC2 Dashboard, click the orange “Launch instance” button.

Step 4: Choose an Amazon Machine Image (AMI)

You’ll see a list of AMIs. Select the “Amazon Linux 2 AMI (HVM) – Kernel 5.10, SSD Volume Type”. Make sure it’s marked “Free tier eligible”. This is a robust and widely used Linux distribution.

Step 5: Choose an Instance Type

Select “t2.micro”. This instance type is also “Free tier eligible” and suitable for learning and small applications.

Click “Next: Configure Instance Details”.

Step 6: Configure Instance Details

For now, you can leave most settings as default. Ensure “Auto-assign Public IP” is set to “Enable” so your instance gets a public IP address for internet access.

Click “Next: Add Storage”.

Step 7: Add Storage

The default 8 GiB General Purpose SSD (gp2) volume is usually sufficient for a basic instance and falls within the Free Tier. You can increase it if needed (up to 30 GiB for Free Tier).

Click “Next: Add Tags”. (Optional: Add a tag like Key: Name, Value: MyWebServer)

Click “Next: Configure Security Group”.

Step 8: Configure Security Group

This is crucial for security! A Security Group acts as a virtual firewall. We need to allow SSH access to connect to our instance. You have two options:

  • Create a new security group: Give it a name (e.g., web-server-sg) and a description.
  • Add Rule: Select “SSH” from the type dropdown. For “Source”, choose “My IP” to allow SSH only from your current public IP address (recommended for security), or “Anywhere” (0.0.0.0/0) for broader access (less secure).
  • If you plan to host a web server, also add an “HTTP” rule (port 80) from “Anywhere”.

Click “Review and Launch”.

Step 9: Review Instance Launch and Create Key Pair

Review all your settings. When you’re ready, click “Launch”.

A pop-up will appear asking you to select an existing key pair or create a new one. A key pair (.pem file) is essential for securely connecting to your instance via SSH.

  • Choose “Create a new key pair”.
  • Give it a name (e.g., my-ec2-key).
  • Click “Download Key Pair”. Save this .pem file securely! You cannot download it again.
  • Check the acknowledgment box.
  • Click “Launch Instances”.

You’ll see a confirmation page. Click “View Instances” to go back to the EC2 Dashboard and see your instance launching.

Connecting to Your EC2 Instance via SSH

Once your instance’s “Instance state” changes to “running” (it might take a minute or two), you can connect to it.

Step 1: Get Your Instance’s Public IP/DNS

On the EC2 Dashboard, select your running instance. In the “Details” tab below, find the “Public IPv4 address” or “Public IPv4 DNS”. Copy one of them.

Step 2: Set Permissions for Your Key Pair

Open your terminal (macOS/Linux) or use Git Bash (Windows). Navigate to the directory where you saved your .pem file.

Change the permissions of your key file to be read-only by the owner:

chmod 400 my-ec2-key.pem

Step 3: Connect via SSH

Use the ssh command. Replace my-ec2-key.pem with your key file name and your-public-ip with your instance’s public IP address. For Amazon Linux 2, the default username is ec2-user.

ssh -i "my-ec2-key.pem" ec2-user@your-public-ip

If it’s your first time connecting, you might be asked to confirm the authenticity of the host. Type yes and press Enter.

Congratulations! You are now logged into your virtual server in the cloud!

Practice Exercise: Deploy a Simple Web Server

Now that you’ve launched and connected to your EC2 instance, let’s make it serve a simple web page!

  1. Connect to your EC2 instance using the SSH command you just learned.
  2. Update the instance’s packages:
    sudo yum update -y
  3. Install Nginx (a popular web server):
    sudo amazon-linux-extras install nginx1 -y
  4. Start the Nginx service:
    sudo systemctl start nginx
  5. Enable Nginx to start on boot:
    sudo systemctl enable nginx
  6. (Crucial Step) Configure Security Group: Go back to your AWS EC2 console. Select your instance, then go to the “Security” tab, and click on the security group name. Add an inbound rule to allow HTTP (Port 80) traffic from “Anywhere” (0.0.0.0/0).
  7. Verify: Open a web browser and navigate to your instance’s Public IPv4 address. You should see the Nginx welcome page!
  8. Clean Up: Once you’re done, go back to the EC2 Dashboard, select your instance, click “Instance state”, and then “Terminate instance” to avoid incurring charges.

Summary: Your Cloud Journey Begins

You’ve just taken a massive step in your cloud journey! You now understand what Amazon EC2 is, its key components, and how to provision a virtual server. More importantly, you’ve gained hands-on experience by launching an instance, connecting to it, and even deploying a basic web server. This fundamental skill is the bedrock for deploying almost any application in the AWS cloud.

Keep practicing, and soon you’ll be confidently managing your cloud infrastructure!

Storage Services (S3)
Next

Copyright © 2026 FullStackDost. All Rights Reserved.

Powered by EduPress