EBS Flashcards
Can you have an EBS volume mounted in a different AZ than its instance?
No, they must be in same availability zone
Which volume types can you modify on the fly?
all except magnetic (standard)
Have an EC2 instance in one zone, want to create volume in different zone, how to do it
- snapshot the EC2 volume
- create volume from the snapshot
- Now can change the type of the volume and the AZ
- Can attach this volume to another EC2 instance
How to move an EBS volume to different AZ or region
to move an EBS volume from one AZ to another
create snapshot first
copy snapshot to new location
then create new volume in new AZ
How to move EC2 instance from one region to other
create snapshot
copy / move snapshot to new region
create image from snapshot (then can boot to new EC2 instance)
Use case for snapshots
snapshots for backups
Use case for images
images for creating new EC2 volumes
Volumes exist on?
EBS
EBS is what
a virtual hard disk
snapshots exist where?
on S3
What are snapshots?
point in time copy of volumes. Incremental snapshots mean only changed blocks are copied to S3
First step to creating snapshot of EBS volumes serving as root devices?
Stop the instance. Optional but ensures files are not changing
Can you create an AMI from Volumes and Snapshots?
Yes, from both
What 2 things can you change for EBS volumes on the fly?
Yes including size and storage type
Will volumes always been the same AZ as the EC2 instance?
yes
To move EC2 volume from one AZ or region what do you do?
Take a snapshot or image
then copy to new location
Are snapshots of encrypted volumes, encrypted automatically?
Yes
Are volumes restored from encrypted snapshots automatically encrypted?
Yes
When can you share snapshots?
any time if they are unencrypted.
EBS vs Instance Store
Instances with EBS volume as boot device can be stopped
Instances with Instance Store for boot device can’t be stopped, only rebooted or terminated
Might want to stop an instance to move it around the datacenter, ie off of a failed hypervisor
Can you detach an EBS volume from an instance and re-assign it to another instance?
Yes, even with root volumes
Ephemeral Storage
Instance Store backed volumes
AMI’s are categorized as backed by what?
EBS or instance store volumes
EBS-backed AMI
root device is an EBS volume created from EBS snapshot
Instance-store backed AMI
root device is an instance store volume created from a template stored in S3
Can instance store volumes be stopped?
No
Can EBS-backed instances be stopped?
Yes
Can ephemeral / instance store backed instances be stopped?
No, only rebooted or terminated
Can you reboot instance store, or EBS backed volumes without losing data?
yes
Default behavior for both types of Root Volumes on termination
is to delete the the root volumes
With EBS you can change this
AWS CLI command to create EBS snapshot
aws ec2 create-snapshot
can you delete a snapshot of EBS volume used as root device of a registered AMI?
No
Will an EBS root volume persist independently after its EC2 instance is terminated?
Only if you specify that it does
How are EBS snapshots backed up to S3
incrementally. Only changes are copied each time