Course 3 EC2 Fundamentals

发布时间 2023-06-29 11:32:50作者: MY93

Amazon EC2

  • EC2 = Elastic Compute Cloud = Infrastructure as Service
  • It mainly consists in the capability of:
    • Renting virtual machines (EC2)
    • Storing data on virtual drives (EBS)
    • Distributing load across machines (ELB)
    • Scaling the services using an auto-scaling group (ASG)

EC2 sizing & configuration options

  • Operating System (OS): Linux, Windows or Mac OS
  • How much compute power & cores (CPU)
  • How much random-access memory (RAM)
  • How much storage space:
    • Network-attached (EBS & EFS)
    • hardware (EC2 Instance Store)
  • Network card: speed of the card, Public IP address
  • Firewall rulesL securtiy group
  • Boostrap script (configure at first launch) : EC2 User Data

EC2 User Data

  • It is possible to bootstrap our instances using an EC2 User data script
  • bootstrappinp means launching commands when a machine starts
  • That script is only run once at the instance first start
    • Installing updates
    • Installing software
    • Downloading common files from the internet
    • Anything you can think of
  • The EC2 User Data Script runs with the root user

EC2 Instance Types

  • AWS has the following naming convention:
    • e.g. m5.2xlarge
    • m: instance calss
    • 5: generation(AWS improves them over time)
    • 2xlarge: size within the instance class

General Purpose

  • Great for a diversity of worklads such as web servers or code repositories
  • Balance between:
    • Compute
    • Memory
    • Networking
  • t2.micro is a General Purpose EC2 instance

Compute Optimized (C type)

  • Great for compute-intesive tasks that require high performance processors:
    • Batch processing workloads
    • Media transcoding
    • High performance web servers
    • High performance computing (HPC)

Memory Optimized (R type)

  • Fast performance for workloads that process large data sets in memory
  • Use cases:
    • High performance, relastional/non-relational databases
    • Distributed web scale cache stores
    • In-memory databases optimized for BI (business intelligence)
    • Applications performing real-time processing of big unstructured data

Storage Optimized (i/D type)

  • Great for storage-intensive tasks that require high, sequential read and write access to large data sets on local storage