AWS Builder Center
Amazon EC2 Explained: My First Steps into Cloud Computing

Amazon EC2 Explained: My First Steps into Cloud Computing

Learn what Amazon EC2 is, how it works, and why it is useful for beginners. This article shares my learning journey and explains cloud servers in simple words with practical examples.

Understanding Amazon EC2: My First Steps into Cloud Computing ☁️

When I started learning about cloud computing, I had many questions. What is the cloud? Where do applications run? Do companies need to buy powerful computers to host their websites?
While learning about AWS (Amazon Web Services), I discovered a service called Amazon EC2. It helped me understand how we can use computers over the internet without buying and maintaining physical servers ourselves.
In this article, I will share what I learned about Amazon EC2, how it works, and why it is useful for beginners.

1. What Is Amazon EC2?

Amazon EC2 stands for Amazon Elastic Compute Cloud.
In simple words, Amazon EC2 allows us to rent virtual computers from AWS and use them whenever we need them.
Think about your personal computer. You can install software, run programs, store files, and perform different tasks on it.
Now imagine having a computer available over the internet that you can use for your projects without purchasing the physical machine. That is the basic idea behind EC2.
These virtual computers are called EC2 instances.
We can choose an instance based on our needs, such as how much processing power, memory, and storage we require.
For example, if I want to host a small website, I can launch an EC2 instance and use it to run my website instead of purchasing a physical server.

2. Why Do We Need Amazon EC2?

Before cloud computing became widely available, organizations often needed to purchase physical servers to run their applications.
This involved buying hardware, setting up the machines, maintaining them, and planning for future requirements.
It could be expensive and time-consuming.
With Amazon EC2, we can create virtual servers when we need them and manage them through AWS.
Here are some reasons why EC2 is useful:
  • No need to purchase physical servers: We can use virtual computers provided by AWS.
  • Flexible resources: We can choose an instance that suits our workload.
  • Easy to scale: We can increase or decrease computing capacity as our needs change.
  • Pay for usage: EC2 offers different pricing options, allowing us to choose a suitable payment model.
  • Quick setup: We can launch a virtual server in minutes.
  • Remote access: We can connect to our instance over a network and manage it.
What I found interesting is that we do not always need a powerful computer of our own to start building and testing applications.

3. How Does Amazon EC2 Work?

When I learned about EC2, I understood its working through a simple process.
Let's imagine that I want to run a website.

Step 1: Open the AWS Console

First, I sign in to the AWS Management Console.
The console is a web-based interface that allows me to access and manage AWS services.
From there, I can search for EC2 and open the service.

Step 2: Choose an Amazon Machine Image (AMI)

Before launching an instance, I need to select an Amazon Machine Image (AMI).
An AMI is like a template used to create an EC2 instance. It contains the information needed to launch a virtual server, including an operating system and, optionally, preconfigured software.
For example, I might choose an AMI that uses Amazon Linux or Ubuntu.

Step 3: Choose an Instance Type

Next, I select an instance type.
The instance type determines the computing resources available to my virtual server, including its processor capacity, memory, and networking capabilities.
Different workloads need different resources.
For example:
  • A small testing project may need only a small instance.
  • A busy website may need more computing power and memory.
  • A demanding application may require a more powerful instance.
As a beginner, I would start by choosing an instance suitable for my project rather than selecting the most powerful option.

Step 4: Configure the Instance

Now I configure the instance according to my requirements.
This may include selecting network settings, configuring storage, and choosing a key pair for secure access.
I also need to configure a security group, which acts like a virtual firewall. It controls the network traffic allowed to reach the instance and leave it.
For example, if I want to host a public website, I may need to allow HTTP or HTTPS traffic. I should avoid opening unnecessary ports.

Step 5: Launch the Instance

After reviewing my settings, I launch the instance.
AWS creates the virtual server using the selected configuration.
Once the instance reaches the appropriate running state, I can connect to it using a supported method, depending on its operating system and configuration.

Step 6: Install and Run My Application

After connecting to the instance, I can install the software required for my project.
For example, I can install a web server, upload my website files, and configure the server to respond to requests.
If the networking and security settings are correct, users can access my website over the internet.
This is the basic working process of Amazon EC2: choose a server configuration, launch the instance, connect to it, and run your application.

4. A Simple Real-Life Example

Suppose I want to create a personal portfolio website to showcase my projects.
I could use Amazon EC2 for this purpose.
Here is how I would approach it:
  1. Create or sign in to my AWS account.
  1. Open the EC2 service.
  1. Choose an appropriate Amazon Machine Image.
  1. Select a suitable instance type.
  1. Configure storage, networking, and security settings.
  1. Launch the EC2 instance.
  1. Connect to the instance and install a web server.
  1. Upload my portfolio website.
  1. Configure access so visitors can open the website.
Once everything is configured correctly, the EC2 instance can run my website.
This example helped me understand that EC2 is not just a virtual computer. It is a way to obtain the computing resources needed to build and run real applications.

5. What Is an EC2 Instance Used For?

After understanding how EC2 works, I learned that it can be used for many different purposes.

Hosting Websites and Web Applications

We can run web servers and applications on EC2 instances.
For example, a developer can host a portfolio website, a blog, or a web application.

Software Development and Testing

Developers can create temporary environments to test their code without purchasing additional physical machines.
They can launch instances when required and stop using them when testing is complete.

Running Applications

EC2 can run different types of applications, including backend services, business applications, and custom software.

Data Processing

Applications that require computing resources to process data can run on appropriately configured EC2 instances.

Learning and Experimentation

Students and beginners can use EC2 to learn about Linux, Windows Server, networking, remote connections, and server management.
For someone learning cloud computing, EC2 provides a practical way to understand how applications run on remote computers.

6. What Happens When We Stop Using an EC2 Instance?

One important thing I learned is that managing an EC2 instance also means understanding its state.
An instance can have different states, including running, stopped, and terminated.
  • Running: The virtual server is active and can perform its tasks.
  • Stopped: The instance is shut down temporarily. It can generally be started again later.
  • Terminated: The instance is permanently removed and cannot be started again.
Stopping and terminating are not the same thing.
For many EBS-backed instances, stopping the instance can help reduce compute charges, but storage and other resources may still incur charges. Termination can also affect associated resources, depending on their configuration.
Therefore, before launching an instance, I should understand which resources I am creating and how they are billed.

7. Is Amazon EC2 Free?

This was another important question I had while learning AWS.
Amazon EC2 is not automatically free in every situation. The cost depends on the instance type, region, usage, storage, data transfer, and applicable pricing offers.
AWS offers free usage benefits for eligible customers and services, but the availability and conditions can change.
Before launching an instance, I should check the current pricing and free-tier eligibility.
As a beginner, I would also set up billing alerts, monitor my usage, and terminate resources I no longer need.
A useful habit is to check your AWS resources after every practice session. This helps avoid unexpected charges.

8. Security: What Should Beginners Remember?

Learning EC2 also taught me that running a server is not only about making an application work. It is also about keeping the server secure.
Here are a few important practices:
  • Use strong account security and enable multi-factor authentication where possible.
  • Give users only the permissions they need.
  • Configure security groups carefully.
  • Avoid exposing administrative access to the entire internet.
  • Keep the operating system and installed software updated.
  • Protect private keys and never share them publicly.
  • Monitor your instance and review its security settings regularly.
AWS manages the physical infrastructure behind EC2, but customers are responsible for important parts of their own cloud security, including their instance configuration, operating system, applications, and access permissions.
Understanding this shared responsibility is an important step in learning AWS.

9. What I Learned About Amazon EC2

When I first came across cloud computing, the idea of running a computer over the internet seemed complicated.
However, learning about EC2 made the concept easier to understand.
I learned that:
  • Cloud computing allows us to access computing resources over the internet.
  • Amazon EC2 provides virtual servers called instances.
  • An AMI helps us create an instance with a selected operating system and configuration.
  • Instance types determine the computing resources available.
  • Security groups help control network traffic.
  • EC2 can be used for websites, applications, testing, and many other workloads.
  • We need to manage security and monitor costs when using cloud resources.
The most important thing I learned is that cloud computing gives us the flexibility to use computing resources when we need them, without having to own all the physical hardware ourselves.

10. My Next Step

Now that I understand the basic concept of EC2, my next step is to gain practical experience.
I want to explore the AWS Management Console, understand the different instance types, learn how to connect to an instance, and try hosting a simple website.
I also want to learn more about related AWS services, such as Amazon S3 for object storage and AWS IAM for managing access and permissions.
I believe that practical experiments will help me understand cloud computing much better than theory alone.

Conclusion

Amazon EC2 is one of the fundamental services that helped me understand how cloud computing works.
It allows us to create virtual servers, run applications, host websites, and experiment with different technologies without purchasing physical servers.
For beginners, EC2 is a useful starting point for learning about cloud infrastructure, networking, operating systems, and security.
My learning journey has just started, and I look forward to exploring more AWS services and building projects with them.
If you are also beginning your cloud computing journey, start with the basics, experiment carefully, and keep learning one step at a time!
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