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
Convertible Reserved Instance
• Can change the EC2 instance type, instance family, OS, scope and tenancy
• Up to 66%~ discount
EC2 Savings Plans
• Get a discount based on long-term usage
• Commit to a certain type of usage
• Usage beyond EC2 Savings Plans is billed at the On-Demand price
• Locked to a specific instance family & AWS region
• Flexible accross = Instance Size, OS , Tenancy
EC2 Spot Instances
• Can get a discount of up to 90% compared to On-demand
• Instances that you can “lose” at any point of time if your max price is less than the current spot price
• The MOST cost-efficient instances in AWS
• Useful for workloads that are resilient to failure
• Not suitable for critical jobs or databases
EC2 Dedicated Hosts
• A physical server with EC2 instance capacity fully dedicated to your use
• Allows you address compliance requirements
• The most expensive option
• Purchasing Options= On-demand - Reserved
• Useful for software that have complicated licensing model
• Companies that have strong regulatory or compliance needs
EC2 Dedicated Instances
• Instances run on hardware that’s dedicated to you
• May share hardware with other instances in same account
• No control over instance placement
EC2 Capacity Reservations
• Reserve On-Demand instances capacity in a specific AZ for any duration
• No time commitment (create/cancel anytime), no billing discounts
• Combine with Regional Reserved Instances and Savings Plans to benefit from billing discounts
• You’re charged at On-Demand rate whether you run instances or not
• Suitable for short-term, uninterrupted workloads that needs to be in a specific AZ
Reserved Instances Classes
• Standard RI
Although some of its attributes (such as the instance size) can be modified during the term, the instance family cannot be modified which is what the scenario requires.
• Scheduled RI
this type only enables you to purchase capacity reservations that recur on a daily, weekly, or monthly basis, with a specified start time and duration, for a one-year term.
• Convertible RI
Enables you to exchange one or more Convertible Reserved Instances for another Convertible Reserved Instance with a different configuration, including instance family, operating system, and tenancy.