Lesson 5: EC2 elastic compute Flashcards

(13 cards)

1
Q

AWS Budget Setup

A

Access to billing data requires enabling IAM user and role access in the root account.
The AWS Billing console provides detailed cost breakdowns by service and month.
The Free Tier dashboard helps monitor usage and forecast potential charges.
Setting up budgets and alarms can prevent unexpected AWS costs by sending alerts when thresholds are reached.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

EC2 Basics

A

Amazon EC2 stands for Elastic Compute Cloud and provides Infrastructure as a Service (IaaS) on AWS.
EC2 allows renting virtual machines called instances, with customizable operating systems, CPU, memory, storage, and networking.
EC2 User Data scripts enable bootstrapping by automating tasks during the first launch of an instance.
Various instance types exist to fit different application needs, with the t2.micro instance included in the AWS free tier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

EC2 Instance Types Basics

A

EC2 instances are categorized into types optimized for different workloads such as general purpose, compute optimized, memory optimized, and storage optimized.
AWS uses a naming convention for instances: Instance Class (e.g., M), generation number (e.g., 5), and size (e.g., 2xlarge).
General purpose instances balance compute, memory, and networking, suitable for diverse workloads like web servers.
Compute optimized instances (C series) are ideal for CPU-intensive tasks like batch processing and machine learning.
Memory optimized instances (R series and others) are designed for workloads requiring large RAM, such as databases and real-time big data processing.
Storage optimized instances (I, G, H series) excel at local storage access for transactional processing and data warehousing. EC2 instances for workloads that require high, sequential read/write access to large data sets, making them ideal for your high-frequency OLTP database.
The t2.micro instance is part of the AWS free tier, offering 750 hours per month.
The website instituteinstance.info is a useful resource to compare EC2 instance types, costs, and specifications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Security Groups & Classic Ports Overview

A

Security groups act as firewalls controlling inbound and outbound traffic for EC2 instances.
Security groups only contain allow rules and can reference IP addresses or other security groups.
Default inbound traffic is blocked, while outbound traffic is allowed.
Important ports to know include 22 (SSH), 21 (FTP), 80 (HTTP), 443 (HTTPS), and 3389 (RDP).
AI may make mistakes. Verify f

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SSH Overview

A

SSH is a secure shell protocol used to connect to Linux servers for maintenance or actions.
Different operating systems require different SSH tools: Mac/Linux use SSH CLI, Windows before version 10 uses Putty, and Windows 10 or later can use SSH CLI.
EC2 Instance Connect allows connecting to EC2 instances via a web browser and supports all major operating systems.
Troubleshooting SSH issues often involves checking security group rules, commands, or typos; EC2 Instance Connect can resolve many common problems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

EC2 Instance Connect

A

EC2 Instance Connect provides a browser-based SSH session to EC2 instances, simplifying access without managing SSH keys.
The default username for Amazon Linux 2 AMI is ec2-user, which is automatically set by AWS.
EC2 Instance Connect requires port 22 to be open in the security group’s inbound rules for successful connection.
It is important to allow both IPv4 and IPv6 SSH inbound rules depending on your network setup.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

EC2 Instance Purchasing Options

A

On-demand EC2 instances are suitable for short workloads with predictable pricing and pay-per-second billing.
Reserved instances offer significant discounts for long-term workloads with one or three-year terms and options for upfront payments.
Savings plans provide flexible discounts based on committed spend rather than specific instance types.
Spot instances offer the highest discounts but can be interrupted at any time, making them suitable for fault-tolerant workloads.
Dedicated hosts and dedicated instances provide physical server isolation for compliance or licensing needs.
Capacity reservations guarantee instance availability in a specific availability zone without discounts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

IP Address Charges in AWS

A

Since February 1st, 2024, AWS charges $0.005 per hour for all Public IPv4 addresses created in your account, regardless of usage.
New AWS accounts receive a 12-month free tier of 750 hours per month of Public IPv4 usage for EC2 instances; other services do not have a free tier.
Services like load balancers and Amazon RDS incur Public IPv4 charges immediately, with no free tier.
IPv6 adoption is encouraged to avoid charges, but many ISPs do not yet support IPv6, so IPv4 usage and charges remain relevant.
AWS provides tools such as the Billing and Cost Management console and Amazon VPC IP Address Manager (IPAM) to monitor and troubleshoot IPv4 charges.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Spot Instances & Spot Fleet

A

EC2 Spot Instances offer up to 90% cost savings compared to On-Demand instances by bidding a maximum spot price.
When the spot price exceeds the max price, instances can be stopped or terminated within a two-minute grace period.
Spot blocks provide interruption-free spot instances for a fixed duration between one to six hours.
Spot Fleets allow launching multiple spot and On-Demand instances across various pools with strategies like lowest price, diversified, and capacity optimized to maximize cost savings and availability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Private vs Public vs Elastic IP

A

IPv4 is the most common IP format, consisting of four numbers separated by dots, allowing approximately 3.7 billion unique public addresses.
Public IPs are unique across the internet and allow machines to be accessible globally, while private IPs are unique only within a private network.
Private IPs enable communication within a private network and connect to the internet via NAT devices and internet gateways.
Elastic IPs are static public IPv4 addresses in AWS that can be reassigned to different instances but are limited in number and generally discouraged in favour of DNS or load balancers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

EC2 Placement Groups

A

Placement groups allow control over EC2 instance placement within AWS infrastructure.
Cluster placement groups provide low-latency, high-throughput networking within a single availability zone but carry higher risk.
Spread placement groups distribute instances across different hardware to minimize simultaneous failures, limited to seven instances per AZ.
Partition placement groups spread instances across multiple partitions (racks) within AZs, supporting large-scale, partition-aware applications like Hadoop and Kafka.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Elastic Network Interfaces (ENI) - Overview

A

Elastic Network Interfaces (ENIs) are virtual network cards within a VPC that provide network connectivity to EC2 instances.
Each ENI can have a primary private IPv4 address, multiple secondary IPv4 addresses, and associated elastic or public IPv4 addresses.
ENIs can be created independently of EC2 instances and attached or moved between instances within the same Availability Zone for failover.
ENIs are bound to a specific Availability Zone and support multiple security groups and MAC addresses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

EC2 Hibernate

A

EC2 Hibernate preserves the in-memory RAM state by saving it to the root EBS volume, enabling faster instance boot times.
The root EBS volume must be encrypted and have sufficient space to store the RAM dump.
Hibernate supports many instance families and operating systems but excludes bare metal instances.
Hibernation is intended for use up to 60 days and is available for on-demand, reserved, and spot instances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly