AWS Elastic Compute Cloud (EC2)
Sajjad Rahman
Posted on November 18, 2024
What is EC2
Amazon Elastic Compute Cloud (EC2) is a cloud-based service that allows us to launch and manage virtual servers (memory, network, and compute capacity), known as instances, which run on our chosen operating system and applications
Amazon EC2 combines CPU, RAM, and storage (disk) to create a virtual computing environment.EC2 is similar to our personal computer, but multiple users use it at different times. The term elastic
refers to its ability to automatically scale up or down based on your workload needs, providing flexibility and cost-efficiency.
Why do we use EC2
In traditional on-premises setup, we must handle everything from checking hardware configurations and upgrading systems to ensuring security, but with Amazon EC2, AWS takes care of these tasks,
providing automatic updates, enhanced security, and scalability so we can focus more on our applications and business needs.
Types of EC2 Instance
Depending on the requirements, several types of instances are available. These types are widely used, namely General Purpose, Compute Optimized, Memory optimized, Storage optimized, Accelerator computing, and so on. Each instance type offers different compute, memory, and storage capabilities and is grouped in an instance family based on these capabilities.
Based on the performance it divided into 3 categories
Fixed performance instance provides fixed CPU resources, Burstable Performance instance provides a baseline level of CPU used for large-scale microservices, and Flex instance offers a balance of compute, memory, and network resources in the most effective way.
EC2 setup
This image illustrates a basic architecture of an Amazon Web Services (AWS) EC2 instance setup within a Virtual Private Cloud (VPC).
Region
- The architecture is hosted in a specific AWS region, which consists of multiple availability zones.
VPC (Virtual Private Cloud)
- The green boundary indicates a VPC, a logically isolated network within the AWS cloud.
Availability Zone
- Within the VPC, the setup is located in a single Availability Zone (Zone A), representing a specific data center.
Public Subnet
- A Public Subnet exists in the availability zone, allowing resources (like EC2 instances) to access the internet directly or be accessed from the internet.
Security Group
- A Security Group (marked in red) is associated with the EC2 instance, acting as a virtual firewall that controls inbound and outbound traffic.
EC2 Instance
- The core component of the setup is an EC2 instance, represented by the icon of a microchip and key. This is a virtual server running within AWS.
Key Pair
- A key pair is linked to the EC2 instance, used for secure SSH access to the instance from a remote machine.
EBS Volume
- On the right side, an EBS (Elastic Block Store) volume is depicted. This represents the persistent storage volume that can be attached to the EC2 instance.
AMI (Amazon Machine Image)
- An AMI (icon at the bottom left) is used to launch the EC2 instance. It contains the operating system, applications, and configurations for the instance.
Posted on November 18, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.