EBS Snapshot copy across AWS region - aws-ebs

We are creating an EBS Snapshot from a volume of 5 TB attached to an EC2 instance in an AWS region (us-east-1). This is the initial snapshot (first snapshot) created from the EBS volume. The volume itself is also created from from a series of incremental snapshots (created earlier) in the same region.
When i create the EBS snapshot in the same region, it takes less than 5 minutes for the snapshot to be created (initial snapshot). I understand that this snapshot is initial, as it is the first snapshot being created from the volume.
My question is, this snapshot being the initial one (first one to be created from the restored EBS Volume), will it copy a new set of data (5 TB) internally to S3 (as Snapshots are stored in S3 behind the scenes) ? .
OR because the EBS volume was also restored from some incremental snapshot, when I create first snapshot from this restored volume (in the same region), will it internally just store pointer to the S3 location for the files, as those files are already somewhere in S3 (because the volume was restored from an incremental snapshot) ?
The intent is to understand the reason behind the fact that when I create a full (initial) snapshot from the EBS volume in the same region (us-east-1), it takes less than few minutes, (similar behavior to incremental snapshot), but the moment I attempt to copy the EBS snapshot to another AWS Region, it takes hours (in excess of 12 hours) to complete the EBS snapshot copy operation to other AWS Region (us-west-2) in the absence of any previous snapshots being copied to the remote AWS region earlier, from the same volume

Creating Snapshots in the same region is incremental so if you have existing snapshot aws will only backup the incremental changes, however, when you copy the snapshot to another region, it has no history of the snapshot so it will be considered as brand new snapshot.

Related

AWS EBS Snapshots - Same volumes, different method, still would it be incremental?

Suppose if I've a Lambda script to invoke EBS snapshots. Few days later, I'm invoking the snapshot of the same EBS volumes but via AWS CLI with different name and description. Would the new EBS snapshot be incremental by recognizing the EBS volumes or Would it be considered like a new snapshot? Kindly clarify.
Yes, it will be the same incremental snapshot.
However, if you copy the snapshot and encrypt it later on, new one will be created from scratch. From docs:
If you copy a snapshot and encrypt it to a new CMK, a complete (non-incremental) copy is always created, resulting in additional delay and storage costs.
Similarly, if you copy it to a new region:
If you copy a snapshot to a new Region, a complete (non-incremental) copy is always created, resulting in additional delay and storage costs.
More on copying snapshots and incremental support is described in Incremental snapshot copying.

AMI EC2 EBS Backup- cost forecasting

Actually I have to take forecast of costing for one my instance, which is having a number of volumes attached... These volumes are different in size and types.
Let's suppose I took the AMI backup and terminated the server.
Now my confusion is how would I calculate the cost. The cost will be calculated based on pricing of Amazon EBS Volumes or Amazon EBS Snapshot. Because the cost difference is just double.
Let me know if you can help me understanding.
pricing of Amazon EBS Volumes or Amazon EBS Snapshot Which I took from AWS Pricing :
https://aws.amazon.com/ebs/pricing/
Amazon EBS snapshots are a complex subject due to the way they work.
There is a detailed explanation in: Amazon EBS snapshots - Amazon Elastic Compute Cloud
A quick summary is:
Snapshots contain only the data that is different to previous snapshots (they are incremental)
An AMI is actually a snapshot. So, if you booted a new Amazon EC2 instance from an AMI and then created a snapshot, the snapshot would contain very little since most of the volume was already contained in the previous snapshot (that was part of the AMI). Confused yet?
Any snapshot can be deleted and information will still be retained to allow any other snapshot to be restored. So, the snapshot is actually an 'index' to the snapshot data, and the snapshot data is stored separately to the snapshot itself. You should be questioning your sanity at this point!
So, the cost of Amazon EBS snapshots is mostly based on how much the contents of the volume changes, and how many snapshots (effectively, points-in-time) you wish to keep. If you only keep the most recent snapshot, then all data will be available, but the cost will be minimised because it won't keep any data that has been deleted from the volume.
Bottom line: Snapshots take less space than the data on a volume due to the incremental natures. The more snapshots ("points-in-time"), the more data will be kept and hence the more cost.

AWS EC2 instance snapshot in another region

i m running ec2 instance in 1 region i want to create snapshots of ec2 instances in other region directly without coping and cross region replication in s3, is this possible? if possible then how?
Amazon EBS Snapshots are created in the same region as the original EBS Volume. They can then be used to create a new Volume within the same Region.
If you wish to use an Amazon EBS Snapshot in a different region, the snapshot must first be copied to the other Region. This can done via the Amazon EC2 management console, the AWS Command-Line Interface (CLI) aws ec2 copy-snapshot command, or an AWS API call.
Please note that snapshots are incremental backups. The first snapshot isn't really a full backup. Rather, every snapshot simply copies any blocks that have been modified since any previous snapshot. Blocks are retained while snapshots still require the blocks. This means that blocks made during the initial snapshot could actually be deleted if they are not required by any active snapshots. This is why I say they are not the same as a full backup, which traditionally never has content deleted.
However, when a snapshot is copied to a new region it is copied in full, rather than incrementally.
If you do not with to copy an EBS snapshot between regions, you would need to find a different way to transfer the disk volume (eg filesystem-level synchronisation).
In fact, there should typically be no need to transfer a disk volume -- rather, your systems should be capable of configuring a new server based upon a startup configuration script and data should be stored in a separate database so that it is accessible to multiple instances. It is a very rare case that requires a complete copy of a disk volume.

EBS Snapshots: how data works with incremental backups?

If I have snapshots S1, S2, S3 which are taken while data varying in EBS. S1 is oldest snapshot and S3 is latest snapshot. If I delete the S1, does S3 has all the latest data which was there by the time of taking S3 snapshot on EBS?
When you delete a snapshot, only the data exclusive to that snapshot is removed. Deleting previous snapshots of a volume do not affect your ability to restore volumes from later snapshots of that volume.
If you make periodic snapshots of a volume, the snapshots are incremental so that only the blocks on the device that have changed since your last snapshot are saved in the new snapshot. Even though snapshots are saved incrementally, the snapshot deletion process is designed so that you need to retain only the most recent snapshot in order to restore the volume.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html

How AMI to S3 costs

We a script to create couple of AMI, On successful completion of AMI it deletes the old AMI. As of my understanding AWS only charges for the space we use in S3 for storing snapshot that was created by an AMI.
If I created two AMIs for an instance on different dates(those two AMIs create two different snapshots). will they charge for only new snapshot size? or for the two snapshots?
How AWS charges for this process?
An Amazon Machine Image (AMI) is actually a standard EBS snapshot, with additional metadata.
EBS snapshots are incremental in nature, meaning that only blocks that have been added or changed are copied to Amazon S3.
This means that successive snapshots could incur very little additional cost. Imagine this scenario:
AMI 1 is created from an instance (or, more accurately, from the EBS volumes associated with the instance)
Some data is changed on the EBS volumes
AMI 2 is created from the instance
Since each AMI is a snapshot, and snapshots only copy incremental data to S3, then the additional cost for AMI 2 would only be the new/modified blocks.
If AMI 1 were then deleted, the cost drop would be minimal, since most blocks contained in the AMI 1 snapshot would be kept for the AMI 2 snapshot.
One interesting result of all this (which is merely my suspicion, since I could not find any official statement to this effect) is that, if your AMI is based off an existing volume (eg an AMI from Amazon), then any snapshots/AMIs created of that volume will actually inherit blocks that are part of the original snapshot. Therefore, you (probably) do not pay the full cost of storing that AMI since the snapshot points to blocks already in a snapshot originally created by Amazon. (Don't worry if you didn't understand all that!)
AMIs are stand alone in nature and treated individually no matter whether created out of the same instance on the same day. So they charges of the AMI storage would be calculated 2 times.
For the record the AMI creation involves the snapshotting behind the scenes and AWS performs those snapshots calculating the delta; so the AMI creation process would faster the second time but still they are treated a 2 individual copies.