Skip to content
FullStackDostFullStackDostLearn · Build · Level Up
  • All Courses
  • Updates
  • My Account
  • Practice
  • All Courses
  • Updates
  • My Account
  • Practice
  • 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
      Understanding AWS Database Services: Your Data’s Best Friend in the Cloud
      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
      Understanding Azure Cloud 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: Supercharging 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
      Mastering GCP Compute Services: Your Guide to Cloud Power
      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: Your Cloud Supercomputer Awaits!

Namaste, future Full-Stack Developers! Ever dreamed of having a supercomputer at your fingertips, ready to deploy your brilliant ideas without breaking the bank or wrestling with hardware? Today, that dream becomes a reality. Welcome to a foundational lesson in cloud computing, where we’ll unlock the immense power of Amazon Elastic Compute Cloud (EC2) – the very heart of AWS’s compute services.

Imagine needing a powerful computer to run your applications, but without the hassle of buying, maintaining, or upgrading physical hardware. That’s exactly what EC2 offers: virtual servers in the cloud, ready to scale with your ambitions. This fundamental skill is the bedrock for deploying almost any application in the AWS cloud.

What You’ll Learn in This Lesson:

  • Understand what Amazon EC2 is and why it’s crucial for modern full-stack applications.
  • Demystify core EC2 concepts like Instances, AMIs, Key Pairs, and Security Groups.
  • Gain hands-on experience by launching your very own virtual server (an EC2 instance).
  • Securely connect to your EC2 instance using SSH from your local machine.
  • Deploy a simple Nginx web server on your EC2 instance and make it accessible via the internet.
  • Master the essential practice of terminating instances to manage costs.

Understanding the Core: What is Amazon EC2?

Amazon EC2 provides resizable compute capacity in the cloud. Think of it as renting a virtual computer (which AWS calls 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, not days or weeks.

Why EC2 is Your Full-Stack Canvas

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

  • Deploy Applications Quickly: Spin up a server in minutes, not days or weeks, accelerating your development cycles.
  • Scale on Demand: Handle sudden spikes in traffic effortlessly with features like Auto Scaling, ensuring your application always performs optimally.
  • Experiment Freely: Test new ideas on powerful machines without significant upfront investment. If it doesn’t work out, simply terminate the instance and pay only for the time it was running.
  • Control Your Environment: Choose your preferred operating system, install specific software, and configure your server exactly as needed for your application.

Essential EC2 Concepts: Your Cloud Toolkit

Before we launch our first instance, let’s understand some core terminology. These are the building blocks of your EC2 environment.

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, development environments, and small databases.
  • Compute Optimized: High-performance processors (e.g., c5.xlarge). Ideal for compute-intensive applications like gaming servers or scientific modeling.
  • Memory Optimized: Large amounts of RAM (e.g., r5.xlarge). Perfect for databases, in-memory caches, and big data analytics.
  • Storage Optimized: High-speed local storage (e.g., i3.xlarge). For data warehousing, NoSQL databases, and transactional processing.

For our lesson, we’ll use a t2.micro instance, which is Free Tier eligible and perfect for learning.

2. Amazon Machine Images (AMIs): Your Instance’s Blueprint

An AMI is a pre-configured template that contains the operating system (e.g., Amazon Linux, Ubuntu, Windows Server), an application server, and any pre-installed software packages needed to launch your instance. Think of it as a disk image for your virtual machine. When you launch an instance, you select an AMI to define its initial software state.

3. Key Pairs: Your Digital Key to the Cloud

A key pair, consisting of a public key and a private key, is a crucial security credential. You use the private key (a .pem file that you download and secure) to prove your identity when connecting to your EC2 instance via SSH. The public key resides on the instance itself. Without the correct private key, you cannot access your instance.

4. Security Groups: Your Virtual Firewall

Security Groups act as essential virtual firewalls for your instances. They control inbound (incoming) and outbound (outgoing) traffic at the instance level. You define rules specifying which protocols, ports, and source IP addresses are allowed to communicate with your instance. For example, to allow SSH access, you’ll open port 22 from your IP address.

5. Elastic Block Store (EBS): Persistent Storage

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. This is where your operating system, applications, and data reside, ensuring data durability.

6. Pricing Models: Smart Spending

EC2 offers flexible pricing to suit various needs, ensuring you only pay for what you use:

  • On-Demand: Pay by the hour or second, with no long-term commitment. Best for unpredictable workloads and new applications.
  • 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.

7. Auto Scaling: Handling Traffic Spikes

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.

Hands-On: Launching Your First EC2 Instance

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

Prerequisites: An active AWS account. If you don’t have one, please sign up and configure your billing details. Most steps below fall under the AWS Free Tier, but always monitor your usage.

Step 1: Sign in to the AWS Management Console

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

Step 2: Navigate to the EC2 Dashboard

In the AWS Console search bar at the top, type "EC2" and select the EC2 service from the results. This will take you to the EC2 Dashboard, where you can manage all your virtual servers.

Step 3: Launch an Instance

On the EC2 Dashboard, locate and click the prominent orange "Launch instance" button.

Step 4: Choose an Amazon Machine Image (AMI)

You’ll see a list of available AMIs. For this lesson, select the "Amazon Linux 2 AMI (HVM) – Kernel 5.10, SSD Volume Type". Ensure it’s marked "Free tier eligible". This is a robust, secure, and widely used Linux distribution for AWS workloads.

Step 5: Choose an Instance Type

Select "t2.micro". This instance type is also "Free tier eligible" and perfectly suitable for learning, small development environments, and basic web servers. Click "Next: Configure Instance Details".

Step 6: Configure Instance Details

For now, you can leave most settings as default. The most important setting here for basic connectivity is to ensure "Auto-assign Public IP" is set to "Enable". This provides your instance with a public IP address, allowing it to communicate with the internet (and for you to connect to it). 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). We’ll stick with the default. Click "Next: Add Tags". (Optional: Add a tag like Key: Name, Value: MyWebServer to easily identify your instance later). Click "Next: Configure Security Group".

Step 8: Configure Security Group (CRUCIAL FOR SECURITY!)

This is a critical step for securing your instance and ensuring you can connect to it. A Security Group acts as a virtual firewall.

We need to allow SSH access (port 22) to connect to our instance. Choose "Create a new security group".

  • Security group name: Give it a descriptive name (e.g., my-web-server-sg).
  • Description: Add a brief description (e.g., Security group for my web server EC2 instance).
  • Add Rule:
    • Type: Select "SSH" from the dropdown. This automatically sets the port range to 22.
    • Source: For security, choose "My IP". This automatically detects your current public IP address and allows SSH only from your machine. If your IP changes frequently or you need broader access (less secure), you could choose "Anywhere" (0.0.0.0/0), but "My IP" is highly recommended for development.

Click "Review and Launch".

Step 9: Review Instance Launch and Create Key Pair

Review all your settings one last time. When you’re ready, click "Launch".

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

  • Choose "Create a new key pair".
  • Key pair name: Give it a memorable name (e.g., my-ec2-keypair).
  • Click "Download Key Pair". Save this .pem file securely! You cannot download it again after this step. Losing it means you lose access to your instance.
  • Check the acknowledgment box.
  • Click "Launch Instances".

You’ll see a confirmation page. Click "View Instances" to go back to the EC2 Dashboard and monitor your instance as it launches. Its "Instance state" will change from "pending" to "running".

Congratulations! You’ve successfully launched your first virtual server in the cloud!

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. SSH (Secure Shell) is the standard way to securely access Linux servers remotely.

Prerequisites:

  • macOS/Linux: You can use your built-in terminal.
  • Windows: We recommend using Git Bash (which comes with Git for Windows) or the built-in Windows Subsystem for Linux (WSL) for a Linux-like terminal experience.

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/Git Bash. Navigate to the directory where you saved your .pem file (e.g., cd ~/Downloads).

It’s crucial to set the correct permissions for your private key file. SSH requires that your private key file is not publicly viewable to ensure security. Change the permissions of your key file to be read-only by the owner:

chmod 400 my-ec2-keypair.pem

Replace my-ec2-keypair.pem with the actual name of your downloaded key file.

Step 3: Connect via SSH

Now, use the ssh command to connect. Replace my-ec2-keypair.pem with your key file name and your-public-ip with your instance’s public IPv4 address or DNS name. For Amazon Linux 2, the default username is ec2-user.

ssh -i "my-ec2-keypair.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 securely 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! We’ll install Nginx, a popular web server, and configure your security group to allow web traffic.

  1. Connect to your EC2 instance using the SSH command you just learned.
  2. Update the instance’s packages: It’s good practice to ensure your server’s software is up-to-date.
    sudo yum update -y
  3. Install Nginx (a popular web server): Amazon Linux uses amazon-linux-extras for certain packages.
    sudo amazon-linux-extras install nginx1 -y
  4. Start the Nginx service:
    sudo systemctl start nginx
  5. Enable Nginx to start on boot: This ensures Nginx automatically restarts if your instance reboots.
    sudo systemctl enable nginx
  6. (Crucial Step) Configure Security Group: Your instance is now running Nginx, but its firewall (Security Group) is still blocking web traffic. You need to open port 80 (HTTP).
    • Go back to your AWS EC2 console.
    • Select your running instance.
    • Click on the "Security" tab.
    • Click on the security group name associated with your instance (e.g., my-web-server-sg).
    • In the security group details, click on "Edit inbound rules".
    • Click "Add rule".
    • For Type, select "HTTP" (Port 80).
    • For Source, choose "Anywhere-IPv4" (0.0.0.0/0) to allow web access from any IP address.
    • Click "Save rules".
  7. Verify: Open a web browser on your local machine and navigate to your instance’s Public IPv4 address. You should now see the Nginx welcome page!
  8. Clean Up: Once you’ve verified your web server and are done with this lesson, it’s vital to terminate your instance to avoid incurring charges. Go back to the EC2 Dashboard, select your instance, click "Instance state", and then "Terminate instance". Confirm the termination.

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, securely 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.

Remember to always terminate instances you no longer need to manage costs effectively. Keep practicing, and soon you’ll be confidently managing your cloud infrastructure!

Storage Services (S3)
Next

Copyright © 2026 FullStackDost. All Rights Reserved.

  • Privacy Policy
  • Terms of Service
  • Contact Support

Powered by EduPress