The Talent500 Blog

Mastering EC2: Unleashing the Power of Elastic Compute Cloud in AWS

EC2

Amazon Elastic Compute Cloud (EC2) is a popular web service offered by Amazon Web Services (AWS) that allows you to create and manage virtual machines, known as instances, in the AWS infrastructure. EC2 provides resizable and scalable computing capacity in the cloud

Instances: Instances are virtual machines in the cloud.

The Traditional Server Provisioning Process:

The Innovation of EC2:

Unique Characteristics of EC2:

Architecting and Managing EC2 Applications:

ADVANTAGES OF EC2

It enables users to quickly create, configure, and launch virtual servers known as EC2 instances to run applications and services.

AMAZON MACHINE IMAGES (AMIs)

When it comes to installing the operating system (OS) on your EC2 instance, the first step is to have a bootable image.

AMIs(Amazon Machine Images) are pre-configured templates with the operating system, applications, and software needed to launch an EC2 instance.

EC2 SIZING AND CONFIGURATION OPTIONS

EC2 INSTANCE TYPES

General Purpose Instances ( T, M,A):

The computation, memory, and networking resources in general-purpose instances are well-balanced. Common use cases for General Purpose Instances include hosting gaming servers, managing small databases, handling personal projects, etc. For instance, if you have an application with relatively equal computing, memory, and networking resource requirements, and optimization in any specific resource area is not crucial, a general-purpose instance can efficiently execute the program

Types:

Compute Optimized Instances(C) :

Compute-optimized instances are well-suited for applications demanding substantial computational power and benefit from high-performance CPUs. These instances can be utilized for various workloads, including web hosting, application deployment, and gaming servers, similar to general-purpose instances. They excel in supporting high-performance applications such as web servers and gaming servers.

Types:

C4, C5 — Main compute optimized instances, C5 uses newer hardware.

C5n — the same as C5, but with higher bandwidth.

Memory Optimized Instances (R, X, Z):

Memory-optimized instances are designed for workloads that involve processing large datasets in memory. In this context, ‘memory’ refers to RAM, which enables the concurrent execution of multiple tasks. The data stored in memory is utilized for executing central processing unit (CPU) tasks, loaded from storage to memory for efficient processing. This preloading process grants the CPU direct access to the computer program.

For scenarios where a workload demands the preloading of substantial volumes of data before executing an application, a memory-optimized instance is recommended. Examples of such workloads include high-performance databases or tasks requiring real-time processing of significant amounts of unstructured data. In these situations, opting for a memory-optimized instance is ideal, as it is tailored to run applications demanding both high memory capacity and performance

Types:

R4, R5 — Same as with C4 and C5 this is the main instances but R5 newer.

R5a — Instance based on AMD processors.

X1, X1e — the lowest prices per GiB of RAM, but CPU is slightly slower than in usual instances.

z1d — Both CPU and RAM are very high.

Storage Optimized Instances (I, D, H):

Storage-optimized instances are tailored for workloads requiring rapid, sequential read and write access to extensive datasets. Examples of such workloads include distributed file systems, data warehousing applications, and high-frequency online transaction processing (OLTP) systems. These instances are designed to minimize latency when applications access data.

Types:

Accelerated Computing Instances (P, F, G, Inf1):

Coprocessors play a crucial role in accelerated computing instances by enhancing the efficiency of specific operations compared to software executed on CPUs. These operations include tasks such as floating-point numeric computations, graphics processing, and data pattern matching. A Hardware Accelerator/Co-processor is a computing component designed to expedite data processing. Accelerated computing instances find applications in graphics, game streaming, and application streaming due to their ability to optimize these functions effectively.

Types

HPC Optimized(H)

High Performance Computing (HPC) enables scientists and engineers to address intricate, compute-intensive challenges like computational fluid dynamics (CFD), weather forecasting, and genomics. HPC applications usually necessitate instances with elevated memory bandwidth, low latency, high bandwidth network interconnect, and access to a fast parallel file system

Price Plans

 


INTRODUCTION TO SECURITY GROUPS

  1. Attachment flexibilitySecurity Groups can be attached to multiple instances for consistent security policies.
  2. Region and VPC-specific:Security Groups are restricted to specific regions and VPC combinations.
  3. 3. External impact:Security Groups operate outside EC2 instances, blocking trafficthat the instance won’t see.
  4. Separate SSH security:It’s advisable to maintain a separate Security Group for SSH access.
  5. Troubleshooting clues:Time-out suggests Security Group issues, while “connection refused” points to application errors or launch problems.
  6. Default traffic behaviour: Inbound traffic is blocked by default, while outbound traffic is authorized by default.

USER DATA

Note:  The  User Data is executed only once, during the initial launch of the instance. Subsequent changes or configurations typically require other methods such as SSH or remote management tools.

PURCHASING OPTIONS FOR EC2 INSTANCE

  1. On-Demand Instances:Ideal for short workloads with predictable pricing, billed by the second.
  2. Reserved Instances:Best for long workloads, offering significant cost savings over time with 1-year or 3-year commitments.
  3. Convertible Reserved Instances:Similar to Reserved Instances but with the flexibility to change the instance type later.
  4. Savings Plans:Requires a commitment to a specific amount of usage, suitable for long workloads, available in 1-year or 3-year options.
  5. Spot Instances: Well-suited for short workloads with low costs, but instances can be lost if demand exceeds supply (less reliable).
  6. 6. Dedicated Hosts:Allows booking an entire physical server, providing control over instance placement.
  7. Dedicated Instances:Ensures that no other customers share the underlying hardware.
  8. Capacity Reservations:Enables reserving capacity in a specific Availability Zone (AZ) for any desired duration.

Conclusion
Tailoring to specific workloads and application needs, you have the flexibility to select from various Amazon EC2 instance types as detailed in this guide. Amazon EC2 consistently broadens its array of instance types through ongoing releases to accommodate diverse workloads .We discussed virtualization, EC2 characteristics, AMIs, and the importance of selecting the right instance types and sizing options based on your needs. Additionally, we touched upon pricing configurations to help optimize costs.

At the time of writing this blog, in AWS there are approximately 776 instance to choose from.  You can use www.ec2instances.info website that will help you to choose the right instance for your workload on the basis of many parameters.

1+