Unlocking the Power of the Cloud: EC2

Unlocking the Power of the Cloud: EC2

EC2 complete beginners guide

Published Feb 1, 2024
Hello Cloud Learners,
Here is an another article about AWS services and this time EC2 service.
Everybody knows, AWS launched Amazon EC2 in 2006 and almost people using this service around 17 years. This compute service is mainly focus on securing and resizable compute capacity to support virtually any workload.
With growing business demands, many organizations are seeking the scalability, flexibility, and cost-efficiency the cloud provides. Amazon EC2 delivers secure, resizable compute capacity to meet changing infrastructure needs. This article will explore how EC2 instances work, when to use them, and capabilities that enable customized and robust cloud solutions. Discover how the extensive attributes of Amazon EC2 can propel innovation for your workloads.
The title "Unlocking the Power of the Cloud" captures how EC2 provides the key that unleashes the scale, agility, and economics of the cloud. The opening sets the context of businesses seeking these cloud benefits, and how purpose-built capabilities of EC2 can meet infrastructure capacity and performance needs effectively

What is Amazon EC2?

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides secure, resizable compute capacity in the cloud.
Access reliable, scalable infrastructure on demand. Scale capacity within minutes with SLA commitment of 99.99% availability.
Provide secure compute for your applications. Security is built into the foundation of Amazon EC2 with the AWS Nitro System.
Optimize performance and cost with flexible options like AWS Graviton-based instances, Amazon EC2 Spot instances, and AWS Savings Plans.

Amazon EC2 High level Architecture:

Below diagram shows a basic architecture of an Amazon EC2 instance deployed within an Amazon Virtual Private Cloud (VPC). Let's talk about in another article about VPC with some real time examples but you may refer this VPC guide.
In this example, the EC2 instance is within an Availability Zone in the Region. The EC2 instance is secured with a security group, which is a virtual firewall that controls incoming and outgoing traffic.
A private key is stored on the local computer and a public key is stored on the instance. Both keys are specified as a key pair to prove the identity of the user. In this scenario, the instance is backed by an Amazon EBS volume.

Amazon EC2 vs On-premises servers:

There are many advantages of using EC2 comparing to On-premises servers and few of them listed below.
  1. Pay for what you use: EC2's pay-as-you model means you pay for the actual capacity you use. No need for upfront CapEx on servers and overprovisioning capacity that often goes unused.
  2. Scaling flexibility: The cloud elasticity of EC2 allows you to scale capacity and performance up and down to meet actual demands. This prevents overbuying resources.
  3. Serverless options: Services like AWS Lambda allow running code without ANY servers when workloads are intermittent or spiky. This is a highly cost-efficient approach.
  4. Reduced data center costs: With EC2 you don't need to house and operate your own data centers, which greatly drives down related cooling, power, real estate, and facilities costs.
  5. Bulk discounts: EC2 Reserved Instances provide greater discounts of up to 75% compared to On-Demand pricing through a 1 or 3 year commitment. This can cut TCO significantly.
  6. Spot instances: Using EC2 spot instances can save you upto 90% in costs compared to running heavy workloads on-premises 24/7. The model allows cheap spare capacity.
  7. Reduced labor: EC2 automation & management vastly simplifies deployment, updates & support. Less reliance on specialized on-prem ops teams further optimizes labor costs.

Use cases of Amazon EC2

  • Run Cloud-Native and Enterprise Applications
  • Scale for HPC Applications
  • Develop for Apple Platforms
  • Train and Deploy ML Applications
  • Hosting web/app servers
  • Running enterprise apps
  • High performance computing
  • Batch data processing
  • Analytics platforms
  • Gaming servers and many more
Some of the key features of EC2 as listed below.
  • Instances
  • Amazon Machine Images (AMIs)
  • Elastic IP addresses
  • Security groups
  • Regions, Availability Zones, Local Zones, AWS Outposts, and Wavelength Zones
  • Instance types
  • Instance store volumes
  • Key pairs
  • Amazon EBS volumes
  • Tags
There are few limitations of using this service but not limited to,
  • Vendor dependency on AWS
  • Perception of less control than on-prem
  • AWS knowledge expertise required
Here are ten interesting facts about Amazon EC2 that might be lesser known:
  1. EC2 provides auto scaling functionality that will automatically launch or terminate instances to maintain the desired capacity based on demand. This helps handle spikes and dips in traffic efficiently.
  2. You can change the EC2 instance type on the fly without stopping or rebooting it. This is useful for resizing your instances in response to changing resource requirements.
  3. AWS offers Dedicated Hosts which provide visibility into the underlying sockets and physical cores of the hardware hosting your EC2 instances. This can be useful for software licensing purposes.
  4. EC2 instances can be launched from both Amazon Machine Images (AMIs) as well as AWS Marketplace images which contain software configurations from different vendors.
  5. EC2 instances support multiple Network Interfaces (multiNIC architecture). This allows creating management and data plane isolation at the network level.
  6. EC2 offers placement groups which provides additional control over where your instances are physically placed to optimize for lower latency, higher throughput etc. based on your application needs.
  7. You can change the EC2 pricing model from On-Demand to Reserved or Spot on the fly without any instance changes. Useful for cost optimization of steady-state workloads.
  8. EC2 has support for Encrypted Root Device Volumes and EC2 Dedicated Instances making it suitable for highly secure or regulated workloads.
  9. AWS Systems Manager service provides detailed system-level visibility and control into your EC2 instances like patch levels, processes, security configuration etc.
  10. The maximum number of Amazon EBS volumes that you can attach to an instance depends on the instance type and instance size
I tried weaving together key takeaways on the benefits discussed throughout the blog, emphasizing the versatility and customizability EC2 makes possible.
Please let me know if your valuable feedback on this and connect with me on LinkedIn for more knowledge sharing.
Happy cloud journey !!!