Exploring AWS EC2: Everything You Need to Know

Karishma Kochar

Karishma Kochar

Corporate Trainer

Use Cases Of EC2
AWS EC2
Everything You Need to Know provides a comprehensive overview of Amazon Elastic Compute Cloud (EC2), a core service in AWS that enables users to rent virtual servers for running applications. This guide covers essential aspects of EC2, including instance types, pricing models (On-Demand, Reserved, Spot), and scaling options (Auto Scaling and Elastic Load Balancing). It explains how to launch and configure instances, manage security groups, and use key pairs for SSH access. Additionally, the guide highlights storage options (EBS and instance store), networking features (VPC integration), and monitoring tools (CloudWatch) for tracking performance and health. By understanding these components, users can effectively leverage EC2 for scalable and flexible cloud computing solutions.

What is AWS EC2?

Exploring AWS EC2 | NovelVista Learning Solutions

Amazon Elastic Compute Cloud (Amazon EC2) is a web service offered by Amazon Web Services (AWS) that provides scalable computing capacity in the cloud. It allows users to run virtual servers, known as instances, to host applications, websites, and services without the need to invest in physical hardware. AWS EC2 is a powerful service that allows users to launch and manage virtual servers in the cloud. With AWS EC2, you can scale your computing capacity based on your needs, making it ideal for both small applications and large-scale enterprise workloads. One of the key benefits of AWS EC2 is the flexibility it offers, enabling users to choose from a variety of instance types and operating systems.

Advantages of AWS EC2

Amazon Web Services
  • Scalability: EC2 instances can be easily scaled up or down based on demand, allowing organizations to manage resources effectively during traffic fluctuations.
  • Rapid Deployment and Elasticity: Instances can be launched and terminated on demand, enabling quick deployment of applications and services while minimizing downtime.
  • Integration with AWS Ecosystem: Seamless integration with other AWS services (like S3, RDS, and Lambda) allows for building robust and secure applications.
  • Cost-effectiveness: Pay-as-you-go pricing eliminates the need for significant upfront investments. Various pricing models (Reserved and Spot Instances) help optimize costs.
  • Reliability: AWS infrastructure ensures high availability and fault tolerance, with automatic failover and data replication across multiple Availability Zones.
  • Global Reach: EC2 instances can be deployed in data centers around the world, reducing latency and improving user experience.
  • Flexibility and Customization: A wide range of instance types and configurations allows users to tailor their computing resources to meet specific application requirements.

Creating an EC2 Instance in AWS

  • Step 1 - Navigate to the EC2 Console.
  • Step 2 - Launch a new EC2 Instance.
  • Step 3 - [Optional] Launch a new EC2 Instance via "Instances" The "Instances" page will display all the running EC2 instances and give you visibility into their parameters, metrics, and options.
    • - From the Instances page, click on "Launch instances."
  • Step 4 - Configure the EC2 Instance.Select the OS for your Instance.Select the AMI for your Instance.
    • -Choose an Instance type.
    • -Choose a Key pair for your instance.
    • -Choose a volume that will be attached to your instance.
    • -Review the Settings & Launch Instance.
  • Step 5 - Wait for the Instance to Launch.

EC2 Demo

EC2 Creation Steps In Detail

Terminating an EC2 Instance in AWS

  • Step 1 - Terminate an EC2 Instance.
    • - From the EC2 Dashboard, click on Instances.
    • - From the list of Instances, choose the Instance(s) you want to terminate.
    • - From the top bar, click on Instance state.
    • - From the drop-down menu, click on Terminate instance.
  • Step 2 - Confirm Volume Deletion.
    • - Click on Terminate.

Start Your AWS Career Today

Gain in-demand skills and expertise with our comprehensive AWS program. Join today and advance your career.

Explore the Program

EC2 Purchasing Options

 EC2 Purchasing Options

On-Demand Instances

On-Demand instances are typically used for short-term workloads, come with predictable pricing, and are billed by the second.

  • Billing starts as soon as the instance is created.
  • Billing ends as soon as the instance is terminated.

Reserved Instances

Reserved instances provide an opportunity to lock-in a lower price on a committed contract. In other words, the user is choosing to prepay for a certain period of time which results in a discount that increases with the length of the commitment. Furthermore, the user can choose the terms of their payment - No Upfront, Partial Upfront, and All Upfront. Paying upfront results in higher discounts.

  • Instances can be reserved for a period of 1 or 3 years.
  • Billing starts as soon as the contract is confirmed.
  • Billing ends at the end of the contract period.

Special - Convertible Reserved Instance

An option for the user to change the EC2 instance type, family, Operating System, Scope, and Tenancy.

Savings Plans

The user chooses to commit to a certain amount of usage instead of a specific instance. Based on the contract, the user is able to lock in a limited amount of usage for a specific timeframe.

  • Usage can be reserved for a period of 1 or 3 years.
  • Billing starts as soon as the contract is confirmed.
  • Billing ends at the end of the contract period or if the usage limit has been exceeded for the billing cycle.

Spot Instances

Spot instances provide the most aggressive discounts for EC2. The user will place a maximum bid they are willing to pay for an instance. If, at any point in time, the current price of an instance exceeds the bid of the user, he will lose that instance. In other words, if there is less demand, the user may benefit from up to a 90% discount, but bears the risk of losing that instance at any point in time.

  • Billing starts as soon as the contract is confirmed.
  • Billing ends as soon as the current bid is higher than what the user has bid.
  • The instance is terminated immediately.

Dedicated Hosts

This option provides access to a physical server aimed at compliance requirements. This option has two sub-options - On-demand and Reserved.

On-demand

  • Billing starts as soon as the instance is created.
  • Billing ends as soon as the instance is terminated.

Reserved

  • Billing starts as soon as the contract is confirmed.
  • Billing ends at the end of the contract period.

AWS EC2 provides high availability and reliability, ensuring your applications remain accessible even during traffic spikes. Whether you're running web servers, databases, or machine learning workloads, AWS EC2 delivers the performance and scalability required to meet your demands.

Instance Types

 Instances Types Amazon EC2

General Purpose

  • Examples: t3, t3a, m5, m5a, m6g
  • Use Cases: Web servers, application servers, and small to medium databases.
  • Features: Balanced compute, memory, and networking resources for a variety of workloads.

Compute Optimized

  • Examples: c5, c5a, c6g
  • Use Cases: High-performance web servers, batch processing, and gaming servers.
  • Features: High compute capacity for workloads that require significant processing power.

Memory Optimized

  • Examples: r5, r5a, r6g, x1e, z1d
  • Use Cases: High-performance databases, in-memory caches, and real-time big data analytics.
  • Features: Large memory sizes for memory-intensive applications.

Storage Optimized

  • Examples: i3, i3en, d2, hs1
  • Use Cases: NoSQL databases, data warehousing, and big data analytics.
  • Features: High disk throughput and IOPS for workloads that require high storage performance.

Accelerated Computing

  • Examples: p4, p3, g4, f1
  • Use Cases: Machine learning, GPU-based applications, and hardware acceleration workloads.
  • Features: GPUs for graphics-intensive applications and FPGA for custom hardware acceleration.

Burstable Performance

  • Examples: t2, t3, t3a
  • Use Cases: Web applications with variable workloads, small databases, and development environments.
  • Features: Allow for CPU usage bursts above the baseline performance.