EBS Volumes and Snapshots
— EC2, EBS, Snapshots, Storage — 1 min read
EBS Volumes Overview
- EBS = virtual hard disk drive in the cloud
- Snapshots exist on S3
- Snapshots are incremental, only changes data is stored to S3
- Volumes will ALWAYS be in the same region as the EC2 instance
- You can change the volume type and/or size "on the fly" without shutting down or terminating your volume
- If you terminate EC2 instance by default root volume is terminated, additional volumes will persist
How to move EBS to another availability zone??
- Take snapshot of EBS Volumes
- Turn snapshot into AMI
- Luanch instance from AMI, choose which availability zone (subnet) to deploy in
How to move EBS to another region??
- Take snapshot of EBS Volumes
- Turn snapshot into AMI
- Click 'Actions' > 'Copy AMI'
- Select Region
Instance Store Volumes
- Instance Store Volumes = Ephemeral Storage
- Instance Store Volumes can't be stopped, if host fails you WILL lose data
- EBS back instances can be stopped, will NOT lose data if stopped
- Can reboot both, will not lose data
- By default, both ROOT volumes will be deleted on termination.
- With EBS volumes, can set instance termination behavior to not delete
EBS Volume Encryption
- snapshots of encrypted volumes are encrypted automatically
- volumes restored from encrypted snapshots are encrypted automatically
- you can share snapshots but only if they are encrypted
- snapshots can be shared with other AWS accounts or made public
- It is now possible to encrypt root volume from launch wizard
How to create Encrypted Volume from already created Unecrypted Volume?
- Create snapshot of unencrypted root device volume
- create copy of the snapshot and select encrypt option
- create AMI from encrypted snapshot
- use that AMI to launch new encrypted instance