This lab walks you through creation of an snapshot of EC2 instance and how to launch a new EC2 instance using the AMI of that snapshot.
Duration: 30 minutes
AWS Region: US East (N. Virginia) us-east-1
What is a Snapshot?
A snapshot is defined as a point-in-time copy of your EBS Volume, which is copied to Amazon Simple Storage Service (Amazon S3).
EBS Volume stands for Elastic Block Store. It's a service that provides persistent block-level storage for Amazon EC2.
These snapshots are incremental copies of data, i.e., only unique blocks of EBS volume data that have changed since the last snapshot was taken.
Only the new and modified blocks from the last snapshot are taken, so it's called "incremental copy" of data.
Snapshots contains all the information needed to restore your data starting from the moment it's created.
Snapshots are chained together. Due to which, we will be able to properly restore the volumes when needed.
Snapshots can be deleted.
When a snapshot is initiated, AWS reads each block, determines if there's any data on the block, and then includes it.
Any data written to the volume after the snapshot creation started is included in the EBS Snapshot, even if the snapshot remains in a "pending" state.
Multi-Volume snapshots allow you to take exact point-in-time, data coordinated, and crash-consistent snapshots across multiple EBS volumes attached to an EC2 instance.
At the time of snapshot creation, you do not need to stop the instance. Because of this, they are automatically taken across multiple EBS volumes. Just like AMIs, you can share snapshots across AWS accounts and regions by modifying its access permissions.
Taking copies of snapshots is allowed in AWS.
Snapshots can be copied only when its status is marked "completed".
Snapshots support EBS Encryption.
Snapshots of encrypted volumes are automatically encrypted.
Volumes that are created from un-encrypted snapshots can be encrypted on-the-fly.
Note - Snapshots can be taken only from EBS volumes, and not Instance Store volumes.
Log into AWS Management Console.
Launch an EC2 instance.
Create a snapshot from the root volume of your instance.
Create an AMI from the snapshot.
Launch a new instance from your created AMI.