EC2 Flashcards
What are the four ways to pay for EC2?
On-Demand Reserved Spot Dedicated hosts
Conditions on payment for termination of a Spot EC2 instance
If the customer terminate the instance, he pays for the hour. If AWS terminate the instance, Amazon pays for the hour.
EBS Volume Types
SSD-GP2: General Purpose SSD (up to 10.000 IOPS) SSD-IO1: Provisioned IOPS SSD (up to 20.000 IOPS) HDD-ST1: Throughput Optimized HDD (magnetic. Frequently accessed workloads. No boot. Ex: big data, DWH, log processing) HDD-SC1: Cold HDD (magnetic. Less frequently accessed data. No boot. Lowest cost storage. Ex: File Server) HDD-Magnetic (standard): lowest bootable cost.
On how many EC2 instances can a EBS volume be mounted?
- An EBS volume can only be mounted on one EC2 instance. If you want to use shared disks, use EFS.
What is the status of Termination Protection by default?
Termination Protection is turned-off by default. It must be turned on manually.
What is the default action on the EBS root volume when the instance is terminated?
On an EBS-backed instance, the default action is for the root EBS volume to be deleted when the instance is terminated.
Can root volumes be encrypted?
EBS boot (root) volumes can be encrypted (but not by default). This feature is based on another feature that allows you to copy an EBS snapshot while also applying encryption.
Volumes exist on … and Snapshots exist on ….
EBS and S3
When you take a Snapshot of a Volume, where does the Snapshot is stored?
On S3
Are Snapshots incremental?
Yes. Only the blocks that have changed since your last Snapshot are moved to S3. The first Snapshot may take some time to create.
What are Snapshots?
Snapshots are point in time copies of Volumes. Snapshots are incremental.
If you take a Snapshot of a encrypted Volume, will the Snapshot be encrypted?
Yes. Snapshots of encrypted Volumes are encrypted automatically.
If you restore a Volume from a encrypted Snapshot, will the Volume be encrypted?
Yes. Volumes restored from encrypted Snapshots are encrypted automatically.
Can snapshots can be shared?
Yes, but only if they are unencrypted. The Snapshots can be shared with other AWS account or made public.
What happens with the EC2 instance if you take a Snapshot of its EBS boot (root) Volume?
You can take a snapshot of an attached volume that is in use (although you should probably better stop it before). However, snapshots only capture data that has been written to your Amazon EBS volume at the time the snapshot command is issued. AWS will not reboot or stop the instance.
Instance Store volumes are also known as…
Ephemeral Storage
What happen if you stop an Instance Store instance?
The data in the Instance Store volumes will be lost
What is the difference between Instance Store volumes backed instances and EBS backed instances at Shutdown (Stop) time?
Instance Store backed instances cannot be stopped (only rebooted or terminated). EBS backed instances can be stopped without losing data.
What is the difference between Instance Store volumes backed instances and EBS backed instances at Reboot time?
Nothing. Both instance types can be rebooted without problems.
What happen if you reboot an Instance Store instance?
Nothing. An Instance Store backed instance can be rebooted without problems.
What happen to Instance Store and EBS boot (root) volumes when the instance is terminated?
By default, both root volumes will be deleted on termination. However with EBS volumes, you can tell AWS to keep the root device volume.
How do you tell AWS to keep an EBS root volume after terminating the instance?
Using the console, you can configure the DeleteOnTermination attribute when you launch an instance. To change this attribute for a running instance, you must use the command line.
How can I take a Snapshot of a RAID array?
Due to interdependencies of the array, there can be problems doing a hot Snapshot because of data held in cache by applications and the SO. To solve this, and application consistent snapshot must be taken. That is, stop the applications from writing to disk and flush all caches to disk. This can be done freezing the filesystem, unmounting the array or, more easily, shutting down the associated EC2 instance.
What’s is the scope of an AMI? (Global, regional…)
AMI’s are regional. An AMI can only be launched from the region in which is stored. However, AMI’s can be copied to other regions using the console, CLI or AWS EC2 API.