Reserved Instances: pay for a specified instance (family, size, region, OS...) and for 1 or 3 years
Savings Plans: $/hr for 1 or 3 years commitment
Spot Instances: spare EC2 computing capacity for fault-tolerant workloads
Dedicated Hosts: no multitenancy, exclusive physicial hardware
Scale Amazon EC2
Amazon EC2 Auto Scaling enables you to automatically add or remove Amazon EC2 instances in response to changing application demand
Vertical Scaling: Adding more resources to one machine
Horizontal Scaling: Adding more instances (ð EC2 Auto Scaling)
Elastic Load Balancer (ELB)
Evenly distribute workload across EC2 instances
Works at a regional level (i.e. highly available)
Single point of contact to redirect all traffic to EC2 Auto Scaling instances
Messaging and Queuing
When systems communicate directly (i.e. send messages to each other straight away), this is called tightly coupled architecture, because as soon as the systems get out of sync, performance degrades
Messaging and Queuing buffers exists to create loosely coupled systems (or decoupled systems) ð High Availability
If one system fails, it won't cascade to other components or the whole system
Amazon Simple Queue Service (Amazon SQS)
Send, store and receive any amount of messages to communicate components
Data inside a message is called payload, and it's preserved
Amazon Simple Notification Service (Amazon SNS)
Pub/sub architecture: 1 producer message spread to N consumers with a topic
Additional Compute Services
Serverless
AWS Lambda: <15min workloads triggered by events
Amazon Elastic Container Service (ECS)
Amazon Elastic Kubernetes Service (EKS)
You can run ECS or EKS in EC2 that you manage or in AWS Fargate (Serverless)
When using AWS Fargate, you do not need to provision or manage servers
AWS Check-in Summary
Cloud Computing & AWS
Cloud computing: On-demand delivery of IT resources over the internet with pay-as-you-go pricing.
AWS provides various services in multiple categories to create solutions.
Amazon EC2
EC2 instances: Virtual servers that can be dynamically created and terminated.
Instance families:
General purpose
Compute optimized
Memory optimized
Accelerated computing
Storage optimized
Scaling options:
Vertical scaling: Resizing the instance.
Horizontal scaling: Adding new instances (can be automated via EC2 Auto Scaling).
Load balancing:
Elastic Load Balancer (ELB) distributes traffic across EC2 instances.
EC2 Pricing Models
On-Demand: No contract, flexible.
Spot Instances: Utilize unused capacity at a discount.
Reserved Instances/Savings Plans: Commit to usage for lower pricing.
Savings Plans: Apply to AWS Lambda, AWS Fargate, and EC2.
Messaging Services
Amazon SQS (Simple Queue Service):
Decouples system components.
Messages stay in queue until consumed or deleted.
Amazon SNS (Simple Notification Service):
Sends messages via email, SMS, push notifications, or HTTP requests.
Messages are sent to all subscribers once published.
Compute Services Beyond EC2
Container Services:
Amazon ECS (Elastic Container Service)
Amazon EKS (Elastic Kubernetes Service)
Both are container orchestration tools.
AWS Fargate:
Runs containers on a serverless compute platform (no need to manage servers).
AWS Lambda:
Serverless function execution (upload code, configure triggers, pay per execution).