EC2 Flashcards
What is EC2?
A Linux-based/Windows-based/Mac-based virtual server that you can provision
What purchasing limits exist for EC2?
You are limited to running On-Demand Instances per your vCPU-based On-Demand Instance limit, purchasing 20 Reserved Instances, and requesting Spot Instances per your dynamic Spot limit per region.
What is AWS Nitro System?
AWS Nitro System is the underlying platform of the next generation of EC2 instances. Traditionally, hypervisors protect the physical hardware and bios, virtualize the CPU, storage, networking, and provide a rich set of management capabilities. With the Nitro System, these functions are offloaded to dedicated hardware and software, thereby reducing the costs of your instances in the process. Hence, the Nitro Hypervisor delivers performance that is indistinguishable from bare metal and performs better than its predecessor: the Xen Hypervisor.
What are EC2 servers called?
Server environments are called instances.
Amazon Machine Image
Package OS and additional installations in a reusable template called Amazon Machine Images.
What are Instance Types?
Various configurations of CPU, memory, storage, and networking capacity for your instances, known as instance types.
What instance type is used for general purpose?
t-type and m-type for general purpose.
What instance type is used for compute optimized?
c-type for compute optimized
What instance type is used for memory-optimized?
r-type, x-type, z-type for memory-optimized
What instance type is used for storage optimized?
d-type, h-type, i-type for storage optimized
What instance type is used for accelerated computing?
f-type, g-type, and p-type for accelerated computing
Key Pairs.
Secure login information for your instances using key.
Instance Store Volumes
Storage volumes for temporary data that are deleted when you STOP or TERMINATE your instance.
What storage volumes are used for persistent storage?
Persistent storage volumes for your data using Elastic Block Store volumes (see AWS storage services).
Security Groups
A firewall that enables you to specify the protocols, ports, and source IP ranges that can reach your instances.
Tags
Metadata, known as tags, that you can create and assign to your EC2 resources
User-Data
A script that will be run on instance boot called user-data.
Host Recovery for Amazon EC2
Automatically restarts your instances on a new host in the event of an unexpected hardware failure on a Dedicated Host.
EC2 Hibernation?
EC2 Hibernation is available for On-Demand and Reserved Instances running on freshly launched M3, M4, M5, C3, C4, C5, R3, R4, and R5 instances running Amazon Linux and Ubuntu 18.04 LTS. You can enable hibernation for your EBS-backed instances at launch. You can then hibernate and resume your instances through the AWS Management Console, or through the AWS SDK and CLI using the existing stop-instances and start-instances commands. Hibernation requires an EC2 instance to be an encrypted EBS-backed instance.
True/False. You can allow automatic connection of one or more EC2 instances to an RDS database.
True.
What are the instance states?
Start, Stop, Hibernate, Terminate
How do you prevent accidental termination?
Enable Termination Protection.
How do you prevent an instance from being accidentally stopped?
By enabling instance stop protection, you can prevent an instance from being accidentally stopped.
What does the root device volume contain?
The root device volume contains the image used to boot the instance.
How can you replace the volume of a running EC2 instance?
-Initial launch state
-Snapshot
-AMI
True/False. Any data on the instance store volumes are retained when the instance is terminated (stoped of failed).
False. You should also back up critical data from your instance store volumes to persistent storage on a regular basis.
True/False. An Amazon EBS-backed instance can be stopped and later restarted without affecting data stored in the attached volumes.
True.
What can be modified on a stopped EC2 instance with EBS storage?
When in a stopped state, you can modify the properties of the instance, change its size, or update the kernel it is using, or you can attach your root volume to a different running instance for debugging or any other purpose.
What happens to an EBS volume when the EC2 instance it is attached to is deleted?
By default, the root device volume for an AMI backed by Amazon EBS is deleted when the instance terminates.
True/False. You cannot launch encrypted EBS-backed EC2 instances from unencrypted AMIs directly.
False. You CAN launch encrypted EBS-backed EC2 instances from unencrypted AMIs directly.
What makes up an AMI?
-A template for the root volume for the instance (OS, application server, and applications)
-Launch permissions that control which AWS accounts can use the AMI to launch instances
-A block device mapping that specifies the volumes to attach to the instance when it’s launched
What does Backed by Amazon EBS mean?
Root device for an instance launched from the AMI is an Amazon EBS volume. AMIs backed by Amazon EBS snapshots can use EBS encryption.
Can AMIs backed by Amazon EBS snapshots use EBS encryption?
Yes.
What does Backed by Instance Store mean?
Root device for an instance launched from the AMI is an instance store volume created from a template stored in S3.
What is the boot time for an EBS-backed AMI and Instance Store-backed AMI?
EBS - usually less than 1 minute
Instance store -usually less than 5 minutes
What is the size limit for a root device for an EBS-backed AMI and Instance Store-backed AMI?
EBS - 64TB
Instance Store - 10GB
What is data persistence for an EBS-backed AMI and Instance Store-backed AMI?
EBS - By default, the root volume is deleted when the instance terminates. Data on any other EBS volume persists after instance termination by default.
Instance Store - Data on any instance store volume persists during the life of the instance.
What modifications can you make to an EBS-backed AMI and Instance Store-backed AMI?
EBS - instance type, kernel, RAM, disk, user data can be changed while the instance is stopped.
Instance Store - Instance attributes are fixed for the life of an instance.
What are charges for an EBS-backed AMI and Instance Store-backed AMI?
EBS - You’re charged for instance usage, EBS volume usage, and storing your AMI as an EBS snapshot.
Instance Store - You’re charged for instance usage and storing. your AMI in Amazon S3.
What is required for AMI creation/building for an EBS-backed AMI and Instance Store-backed AMI?
EBS - Uses a single command/call
Instance Store - Requires installation and use of AMI tools.
What is the stopped state for an EBS-backed AMI and Instance Store-backed AMI?
EBS - Can be in a stopped state. Even when the instance is stopped and not running, the root volume is persisted in Amazon EBS
Instance Store - Cannot be in stopped state, instances are either running or terminated.
True/False. You can copy AMIs to different regions.
True.
What is the Recycle Bin used for?
Restoring deleted AMIs.
True/False. You cannot set lock retention rules to protect against modifications and deletions.
False. You CAN set lock retention rules to protect against modifications and deletions.
By default, how many years from the creation date of a public AMI is it considered deprecated?
After 2-years from the creation date.
True/False. When an AMI changes state, an event is automatically generated, and you can use Amazon EventBridge to detect and respond to these events.
True.
True/False. With UEFI Secure Boot, you can ensure that an instance only boots software signed with cryptographic keys.
True.
True/False. You cannot configure an AMI to use Instance Metadata Service Version 2 (IMDSv2) when requesting instance metadata.
False. You CAN configure an AMI to use Instance Metadata Service Version 2 (IMDSv2) when requesting instance metadata.
What is elastic compute cloud pricing for On-Demand?
Pay for the instances that you use by the second, with no long-term commitments or upfront payments.
What is elastic compute cloud pricing for Reserved?
Make a low, one-time, up-front payment for an instance, reserve it for one or three year terms, and pay a significantly lower hourly rate for these instances. It has two offerings, Standard and Convertible.
What is the standard reserved class?
Provides the most significant discount but you can only modify some of its attributes during the term. It can also be sold in the Reserved Instance Marketplace.
What is the convertible reserved class?
Provides a lower discount than Standard Reserved Instances, but can be exchanged for another Convertible Reserved Instance with difference instance attributes. However, it cannot be sold in the Reserved Instance Marketplace.
What is the average discount of Standard RI and Convertible RI?
Standard RI - 1 year (40%), 3 years (60%)
Convertible RI - 1 year (31%), 3 years (54%)