EC2 Flashcards
Pricing of On Demand EC2 Server
Fixed rate by hour (or second) with no commitment
Good for apps with short term spiky or unpredictable workflows
Pricing of Reserved EC2 Server
Provide with capacity reservation getting a discount on hourly charge for instance.
Must set for 1-3 year terms
Reserved Instance EC2 types and % discount
Standard RI
- up to 72% discount
Convertible RI
- up to 54% off
- feature capability to change attributes of RIs as long as exchange is equal or greater value
Scheduled RI
- Available to launch within time window you reserve.
- Good for predictable schedule
What is a Spot Instance?
EC2 instance where you big price you want on instance capacity.
Great for apps with flexible start and end times
Up to 90% discount
Fluctuates based on supply and demand
Good for users w/ urgent need for large amounts of additional computing capacity
What are EC2 Dedicated Hosts?
Most expensive EC2 Server (physical server).
But, it can help reduce cost by allowing you to use existing server bound software.
Can be purchased on demand (hourly) but is really expensive
Also can be purchased as a reservation for up to 70% off on demand price.
What happens if your spot instance is terminated by EC2 half-way through the hour?
You will not be charged for a partial hour of usage
What happens if you terminate a spot instance yourself (cost-wise)?
You will be charged for any hour in which the instance ran
TRUE or FALSE: You can encrypt the root device volume?
TRUE
TRUE or FALSE: Termination protection is enabled by default on EC2?
FALSE, must turn it on yourself
What is default action of root EBS volume when EC2 instance is terminated?
Root volume is deleted, but other EBS volumes are NOT deleted
What are the underlying hypervisors for EC2?
Zen and Nitro
How can you access the private and public IP address of an EC2 Instance?
Use CURL or GET to access the instance metadata
URI: http://169.254.254/latest/meta-data/Instance
How can you add metadata to an EC2 instance?
Use tags
What is an EC2 Spot Fleet?
A group of Spot and optional On-Demand Instances. AWS will launch a number based on the specified target capacity. It will be fulfilled if the max price you picked exceeds current Spot Price.
What is a EC2 Spot Block?
Stop your EC2 instance form being terminated even if Spot price goes over you max Spot price.
What time interval can a Spot Block be set?
1-6 hours
What are EC2 Spot Instances used for?
Big data and analytics
Containerized Workloads
CI/CD testing
Web services
Image and media rendering
High Performance Computing (HPC)
What are EC2 Spot Instances NOT good for?
Persistent workloads
Critical jobs
Databases
What items do you specify in an EC2 Spot request
Max price
Desired # instances
Launch specs
Request type: one-time | persistent
One-time (request once)
As soon as spot price goes over max price the spot instance is ended
Persistent
When spot goes over max then keeps going though cycle
Valid from, Valid until
EC2 Spot Fleet Options
Capacity Optimized
Diversified
LowestPrices (default)
InstancePoolsToUseCount (spot instances distributed across a number of Spot Instance pools you specify. Param is valid only when used in-combination with lowestPrice
What is EC2 Hibernate?
Hibernate EC2 instance.
Saves contents of RAM to EBS root volume allows for faster reboot
Resume and keeps save instance ID
What is EC2 Hibernate useful for?
long-running processes
Servcies that take a long time to initialize
Size of RAM needed to perform EC2 hibernate
less than 150GB
Max amount of time an EC2 instance can be hibernated for?
60 days max
EC2 Instance types that can be hibernated
On-Demand
Reserved
EC2 instance families that can be hibernated
C, M, R 3-5
Perquisite of enabling hibernation on EC2 instance?
Root Volume must be ENCRYPTED
What is an EC2 Security Group?
You can attach a security group to an EC2 instance that acts like a virtual firewall. It can be used to control traffic (for 1 or more instance).
These can be edited at any time and new rules will be applied immediately.
TRUE or FALSE: Security Groups are Stateful
True
If create inbound rule, outbound rule is created automatically. (anything allowed in is also allowed out)
TRUE or FALSE: Security Groups can be used to Blacklist IP addresses
FALSE
only NACLs can blacklist
Do EC2 Security Groups BLOCK, ALLOW, or BOTH
ALLOW
Everything by default is blocked
What is an Elastic IP address?
Static IPv4 address for dynamic cloud computing. You can remap the address to another instance in your account if there is an instance failure.
You will need this if you do not auto-assign a public IP address.
Is there a Limit to # of Elastic IP addresses you can have?
Yes, there is a limit of 5 per region.
How can you distribute traffic among instances?
Use and Elastic Load Balancer
Use and Elastic Load Balancer
Memory utilization
disk swap utilization
disk space utilization
page file utilization
Note CloudWatch Agent must be installed on EC2 server
How to retrieve user data from running instance?
http://169.254.169.254/latest/user-data
What happens if you stop an instance, modify its user data, and start the instance?
Modified user data is lost.
EC2 User Data Size limit
16KB
What is the EC2 User Data used for?
After instance is started, runs auto configuration tasks and scripts
What is an EC2 placement group?
It determines how instances are placed on underlying hardware
List strategies for EC2 placement groups
Cluster
- puts instances into a low-latency group in a single AZ
Spread
- spreads instances across underlying hardware
Partition
- each partition has own set of racks. No 2 partitions have same rack. Makes it easier to isolate impact failures.
How to detach a EBS root volume from an EC2 instance?
Stop instance and then detach the volume
When to use Cluster EC2 Placement Group
Want all instances in 1 AZ
Need low-latency high throughput or both
Only CERTAIN instances can be launched into Cluster placement Group
When to use Spread EC2 Placement Group
Want EC2 to all be put on separate hardware
Ex. want DB instance and app server on different machines/hardware
Recommended for apps with small # of critical instances that should be kept separate from each other
Can be in multiple AZ zones all in 1 region
INDIVIDUAL critical instances (1 instance on each rack)
For EC2 Placement groups is there a max # of instances per AZ?
Yes 7 per AZ
What EC2 Placement Group(s) should you use if you want to put EC2s in multiple AZs in 1 region
Spread or Partitioned
When to use Partitioned EC2 Placement Group
Can have multiple EC2 instances in a partition
Each partition is on own set of racks
Isolate impact of hardware failures
HDFS, HBase and Cassandra cluster
Can be multiple AZ zones all in 1 region
MULTIPLE EC2 Instances (on each rack)
TRUE or FALSE: you can merge EC2 placement groups
FALSE
TRUE or FALSE: you can move STOPPED instances to a placement group using AWS Console
FALSE
Can only move them with AWS CLI or AWS SDK
How are Windows EC2 Servers Billed?
By the Hour
What are 2 recommended strategies for having the best experience in terms of availability for Spots instances?
Use Proactive capacity rebalancing
Use capacity optimized allocation
Standard network card for EC2 instance
ENI (Elastic Network Interface) . Use multiple ENI for each network.
High Performance Networking for EC2 with Single Root IO Virtualization and high preformance
EN (Enhanced Networking)
What EC2 Networking is needed for rates of 10 GBps - 100 GBps
EN (Enhanced Networking)
Options for EN Networking
ENA (Elastic Network Adapter) - always use
Intel VFA
Networking for EC2 needed for HPC and Machine Learning
EFA (Elastic Fabric Adapter)
Which Networking adapters uses OS By-pass
EFA (Elastic Fabric Adapter) only supported in LINUX
For a Spot Instance: How long do you have to either stop or terminate your instance if it goes above the max Spot price?
2 minutes
How to extend your private VMware Cloud into public AWS
VCenter on AWS Cloud ordered through VMware
When to use Outpost Racks
You have a datacenter (large deployments)
When to use Outpost Servers
Small space requirements for local compute and networking
How to extend AWS to your datacenter
Outposts
TRUE or FALSE, the default NACL can be updated
TRUE
TRUE or FALSE, the default SG can be deleted?
FALSE, but you can update it
TRUE or FALSE, you can remove the default * astrick rule in a NACL
FALSE, it also cannot be updated
TRUE or FALSE, launch configurations allow for versioning
FALSE, use launch templates if you need versions
Default Cool down period of ASG
300 seconds
(5 minutes)
How to setup setup disaster recovery solution on AWS using VMware servers?
Contact your VMware representative to provision dedicated hardware within AWS in which you can deploy vCenter yourself.
Your boss is concerned about over-provisioning resources when an Auto Scaling event occurs. Which dynamic scaling policy should be used to prevent this
Target tracking scaling