Elastic Compute Cloud Flashcards
Amazon EC2
It provides scalable computing capacity in the AWS Cloud.
EC2 sizing & configuration options
• OS /// Bootstarp script: EC2 User Data
• How much compute power & cores (CPU)
• How much random-access memory (RAM)
• How much storage space (EBS/EFS/EC2)
• Network= speed of the card & public IP
• Firewall rules= security group
EC2 User Data & Bootstrapping
• It is possible to bootstrap our instances using an EC2 User data script.
• bootstrapping means launching commands when a machine starts
• That script is only run once at the instance first start
• The EC2 User Data Script runs with the root user
EC2 Instance Types
General Purpose, Compute Optimized, Memory Optimized, Accelerated Computing, Storage Optimized, Instance Features and Measuring Instance Performance
EC2 General Purpose
Great for a diversity of workloads such as web servers or code repositories
-Balance between compute-memory-networking
EC2 Compute Optimized
Great for compute-intensive tasks that require high performance processors, such as, High performance computing (HPC), Batch processing workloads, Media transcoding, Machine Learning and Dedicated gaming servers
EC2 Memory Optimized
Great for compute-intensive tasks that require high performance processors, such as, High performance databases, Distributed web scale cache stores and Applications performing real-time processing of big unstructured data
EC2 Storage Optimized
Great for storage-intensive tasks that require high, sequential read and write access to large data sets on local storage, such as, Databases, High frequency online transaction processing (OLTP) systems, Data warehousing applications and Distributed file systems
Security Groups
They act as a firewall and control how traffic is allowed into or out of our EC2 Instances.
Security Groups - Good to know
• Can be attached to multiple instances
• Locked down to a region/VPC combination
• All inbound traffic is blocked by default
• All outbound traffic is authorised by default
Classic Ports to know
• SSH & SFTP= 22
• FTP= 21
• HTTP= 80
• HTTPS= 443
• RDP= 3389
EC2 Instance Connect
Connect to your EC2 instance within your browser
• Need to make sure the port 22 is still opened
EC2 Instances Purchasing Options
• On-demand
• Reserved (1 or 3 years) = Reserved Instances & Convertible Reserved Intances
• Savings Plans (1 or 3 years) commitment to an amount of usage
• Spot Instances
• Dedicated Host = book an entire physical server
• Dedicated Instances = won’t share hardware
• Capacity Reservations
EC2 On Demand
• Pay for what you use
• Has the highest cost but no upfront payment
• No long-term commitment
• Recommended for short-term and un-interrupted workloads
EC2 Reserved Instances
• Up to 72%~ discount compared to On-demand
• You reserve a specific instance attributes (Instance Type, Region, Tenancy, OS)
• Reservation Period = 1(+) or 3 years(+++)
• No Upfront(+), Partial Upfront(++), All Upfront (+++)
• Reserved Instance’s Scope – Regional or Zonal
• Recommended for steady-state usage applications