Amazon EC2: Overview of AMIs and Instance Types

Introduction to Amazon EC2

  • Amazon EC2 (Elastic Compute Cloud): Offers virtual machines (VMs) for hosting applications, unlike traditional on-premises servers which are expensive and can lead to idle capacity.

  • Provides resizable compute capacity secured in the cloud.

  • Common applications: web servers, database servers, application servers, etc.

Advantages of Amazon EC2

  • Eliminates the need for physical hardware and data centers.

  • Allows on-demand provisioning of resources anywhere in the world.

  • Supports multiple operating systems, including recent versions of Windows, Red Hat, SUSE, Ubuntu, and Amazon Linux.

EC2 Instances

  • EC2 runs on instances which are essentially VMs.

  • Users have full administrative control over their instances (either Windows or Linux).

  • Instances can be launched quickly from Amazon Machine Images (AMIs).

Amazon Machine Images (AMIs)

  • An AMI is a template that includes a server’s operating system and any additional software installed.

  • Four categories of AMIs:

    • Quick Start: Prebuilt AMIs provided by AWS for immediate use (Linux/Windows options).

    • My AMIs: Custom AMIs created by the user.

    • AWS Marketplace: Thousands of AMIs with built-in software solutions available for specific use cases.

    • Community AMIs: Shared AMIs created by users worldwide, use with caution.

Creating AMIs

  1. Launch an instance from a starter AMI or one imported from a local data center.

  2. Customize the instance (e.g., update OS, install software).

  3. Capture the modified instance as a new AMI (stops instance, snapshots root volume).

  4. Optionally, copy the AMI to other AWS regions for broader use.

Choosing an Instance Type

  • AWS EC2 offers various instance types optimized for different workloads, combining CPU, memory, storage, and networking capabilities.

  • Instance type categories include:

    • General Purpose

    • Compute Optimized

    • Memory Optimized

    • Storage Optimized

    • Accelerated Computing

Instance Naming Convention
  • Each instance type name has multiple components:

    • Family name (T, C, R, etc.)

    • Generation number (e.g., T3 indicates third gen)

    • Size (e.g., T3.Large indicates a specific size)

Key Instance Types
  • T3: General-purpose, suited for web applications, development environments, etc.

  • C5: Compute optimized, suitable for resource-intensive tasks like scientific modeling and video encoding.

  • R5: Memory optimized, ideal for high-performance databases and big data analysis.

Network Considerations

  • Each EC2 instance type has specified network performance levels (e.g., A1.medium vs. P3.24xlarge).

  • Placement groups can be used to control how instances are spread across hardware for optimized network performance.

Enhanced Networking

  • Many instance types offer options for enhanced networking, yielding better packet performance, reduced jitter, and lower latencies.