All technological notes.
Amazon EC2Amazon EC2:
Elastic Compute CloudIt mainly consists in the capability of :
Naming convention: [instance_class][generation].[size]
m5.2xlarge, t2.microdifferent types of EC2 instances that are optimised for different use cases
| Type | Feature | Use Case | Example |
|---|---|---|---|
| General Purpose | for a diversity of workloads | web servers | t2 |
| Compute Optimized | for compute-intensive tasks | ML, Gaming server | C6g |
| Memory Optimized | for workloads that process large data sets in memory | In-memory databases | R5 |
| Storage Optimized | for intensive access to large data sets on local storage | OLTP | I3 |
| Option | Feature |
|---|---|
| On-Demand Instances | short workload, predictable pricing, pay by second |
| Reserved (1 & 3 years) - Reserved | long workloads |
| Reserved (1 & 3 years) - Convertible Reserved Instances | long workloads with flexible instances |
| Savings Plans (1 & 3 years) | commitment to an amount of usage, long workload |
| Spot Instances | short workloads, cheap, can lose instances (less reliable) |
| Dedicated Hosts | book an entire physical server, control instance placement |
| Dedicated Instances | no other customers will share your hardware |
| Capacity Reservations | reserve capacity in a specific AZ for any duration |
Reservation Period
Payment Options
Reserved Instance’s Scope
Recommended
You can buy and sell in the Reserved Instance Marketplace



Useful for workloads that are resilient to failure
Other strategy: Spot Block
Not great for critical jobs or databases

EC2 > Instances > Launch an instance
Spot Fleets allow us to automatically request Spot Instances with the lowest price
Spot Fleets
The Spot Fleet will try to meet the target capacity with price constraints
EC2 > Spot requests > Request Spot Instances


Purchasing Options:
The most expensive option
Useful




bootstrapping:
sudo)#!/bin/bash
# Use this for your user data (script from top to bottom)
# install httpd (Linux 2 version)
yum update -y
yum install -y httpd
systemctl start httpd
systemctl enable httpd
echo "<h1>Hello World from $(hostname -f)</h1>" > /var/www/html/index.html
placement groups
Strategies for the group:
Cluster:
Spread:
Partition:




We know we can stop, terminate instances
EBS) is kept intact in the next startOn start, the following happens:
Introducing EC2 Hibernate:
Use cases:
Good to know



AMI: Amazon Machine Image
AMI are built for a specific region (and can be copied across regions)



