AWS Builder Center

Amazon EC2 – A Simple Introduction

Amazon EC2 (Elastic Compute Cloud) is an AWS service that provides virtual servers in the cloud. It allows us to run applications and websites without owning physical servers, with flexible computing resources based on our needs. ☁️💻

Amazon EC2 (Elastic Compute Cloud) is an AWS service that allows us to create and use virtual servers in the cloud. Instead of buying and maintaining a physical computer or server, we can use an EC2 instance provided by AWS.
For a beginner, EC2 can be understood as renting a computer on the internet and using it whenever we need it.

1. What is an EC2 Instance?

An EC2 instance is a virtual server running in the AWS Cloud. We can use it to run applications, websites, programs, and other workloads.
We can choose the amount of:
  • CPU
  • Memory (RAM)
  • Storage
  • Networking capacity
depending on our requirements.

2. How EC2 Works

The basic process is:
Choose an AMI → Choose instance type → Configure → Launch → Connect → Run applications
After launching an EC2 instance, we can connect to it and install the software needed for our application.

3. Amazon Machine Image (AMI)

An AMI is a template used to create an EC2 instance. It contains the operating system and other required software configurations.
For example, we can launch an EC2 instance using an image containing Linux or Windows.

4. Instance Types

EC2 provides different instance types for different workloads.
For example:
  • General-purpose instances → common applications
  • Compute-optimized instances → CPU-intensive applications
  • Memory-optimized instances → applications requiring more memory
  • Storage-optimized instances → applications requiring high storage performance
As a beginner, understanding that different instance types provide different combinations of CPU, memory, and other resources is enough to get started.

5. Storage

EC2 instances can use storage such as Amazon EBS (Elastic Block Store).
EBS provides persistent block storage that can be attached to an EC2 instance. It can be used to store operating systems, applications, and data.

6. Security

Security is an important part of EC2. Security groups act as virtual firewalls that control incoming and outgoing network traffic for an instance.
For example, a security group can allow:
  • SSH traffic for Linux administration
  • RDP traffic for Windows administration
  • HTTP/HTTPS traffic for websites
Only the required traffic should be allowed.

7. Key Pair

A key pair is used to securely connect to an EC2 instance. For example, SSH connections to Linux instances commonly use a private key for authentication.
The private key should be kept secure and should never be shared publicly.

8. Starting and Stopping an Instance

EC2 instances can be started and stopped when needed. When an instance is no longer required, it can also be terminated.
This flexibility is one of the important benefits of cloud computing because resources can be used according to requirements.

9. Benefits of Amazon EC2

  • Provides virtual servers without purchasing physical hardware.
  • Can increase or decrease computing resources based on requirements.
  • Supports different operating systems and instance configurations.
  • Can be used to host websites and applications.
  • Provides integration with other AWS services.
  • Offers different pricing options depending on usage.

10. Simple Example

Suppose I want to create a website but don't have a physical server.
I can:
Launch an EC2 instance → Install a web server → Upload my website → Configure security → Access the website through the internet.
This gives me a practical way to understand how applications can run on cloud servers.

Conclusion

Amazon EC2 is one of the fundamental AWS services for learning cloud computing and virtual servers. It provides flexible computing resources without requiring us to own physical hardware. As a beginner, learning about instances, AMIs, instance types, storage, security groups, and key pairs provides a strong foundation for exploring AWS further.
Simple way to remember:
EC2 = A virtual computer/server in the AWS Cloud. ☁️💻
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