Elastic Compute Cloud Flashcards
What does EC2 stand for
Elastic Compute Cloud
What does EC2 mainly consist of
Renting virtual machines (EC2)
Storing data on virtual drives (EBS)
Distributing load across machines (ELB)
Scaling the services using an auto-scaling group (ASG)
What does bootstrapping mean
launching commands when a machine starts , runs only once on initial start
What kind of boot tasks is EC2 user data used to automate
installing updates
installing software
Downloading common files from the internet
Anything you can think of
Describe the EC2 naming convention
m5.2xlarge
m: instance class
5: generation (AWS improves them over time)
2xlarge: size within the instance class
What is a security group
acts as a virtual firewall for your EC2 instances to control inbound and outbound traffic
How do security groups work
By controlling how traffic is allowed into or out of our EC2 instances
What is one thing security groups contain
allow rules
What do security groups regulate
Access to Ports
Authorized Ip ranges - IPv4 and IPv6
Control of inbound network (from other to the instance
Control of outbounf network (from the instance to other)
How many instances can a security group be attached to
multiple instances
How many regions can one security group be on at one time
Only on region at a time with a VPC combo
Does a security group live inside the EC2?
no it lives outside the EC2 - if traffic is blocked the EC2 instance wont see it
Should you use the same security group for EC2 and SSH access
No its best to have separate security groups
If your app is not accessible (time out ) what kind of issue is this?
security group issue
If your app gives a connection refuse error what type of issue is this
An app error or its not launched
By default how is inbound traffic setup in an security group
Blocked by default
By default how are all outbound traffic configured
Authorized by default
What are the three ways you can connect to an EC2 instance
SSH, Putty , EC2 Instance Connect
Never enter your access key / secret access key into an EC2 instance
Never enter your access key / secret access key into an EC2 instance
Use IAM roles to create password credentials to an EC2 instance
Very true
Describe EC2 On-Demand instances
short workload, predictable pricing
What is the minimum you can have an EC2 instance reserved for
1 year
What is considered a long workload in EC2 instances
Reserved instances
What is a Convertible Reserved instance
Long workloads with flexible instances
What is an Scheduled Reserved Instances
Instances scheduled for a certain time and date
What is a sport instance
short workloads, cheap, can lose instances (less reliable)
What is a dedicated host
Book an entire physical server , control instance placement
Describe EC2 on-demand
Pay for what you use
Has the highest cost but no upfront payment
No long-term contract
Recommended for short-term and un-interrupted workloads, where you cant predict how the application will behave
Describe EC2 Reserved Instances
Up to 75% discount compared to On-demand
Reservation period: 1 year = + discount | 3 years = +++ discount
Reserve a specific instance type
Recommended for steady-state usage apps (think database)
Describe Convertible Reserved Instance
Can change the EC2 instance type
Up to 54% discount
Described Reserved Instances
Launch within time widow you reserve
When you require a fraction of day/ week / month
Still commitment over 1 to 3 years
Describe 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-effiecient instances in AWS
Describe Spot Instances useful cases
Batch jobs Data analysis Image processing Any distributed workloads Workloads with a flexible start and end time
What are Spot instances not useful for
Critical jobs or Databases
What is an EC2 Dedicated Hosts
a physical server fully dedicated for your use
Allocated for your account for a 3-year period reservation
More expensive
Useful for software that have a complicated licensing model (BYOL)
Or for companies that have strong regulatory or compliance needs
Describe EC2 Dedicated Instances
Instances running on hardware thats dedicated to you
May share hardware with other instances in same account
No control over instance placement (can move hardware after Stop/Start)
What is Amazon Responsible for in EC2
Infrastructure
Isolation on physical hosts
Replacing faulty hardware
Compliance validation
What are you responible for in the EC2
Security Groups rules
Operating-system patches and updates
Software and utilities installed on the EC2 instance
IAM Roles assigned to EC2 and IAM user access management
Data security on your instance