Instructor: Now let's talk about Amazon S3 Glacier.
So this is a low-cost object storage meant
for archiving and backup, and the data is going
to be there for the long term,
so we're talking about tens of years.
So it's an alternative to running
a magnetic tape storage on-premises.
So now instead of running things on-premises
and actually storing your data on tapes,
you can do the same in the cloud with Glacier.
The durability is really good,
it's the same as Amazon S3 standard,
so 11 nines and the cost per storage depend on your tier.
If it's standard, it's about 0.4 cents per gigabyte
and if it's the deep archive tier,
it's 0.099 cents per gigabytes which is really, really good.
So, each item in Glacier is called an archive
and an archive can be up to 40 terabytes
and the archives are going to be stored in vaults.
So it's the same as a object and a bucket,
but in Glacier it's called Archive and Vault.
By default, all the data will be encrypted at rest
using AES-256 and the keys are managed by AWS.
So all the data in Glacier is automatically encrypted
no matter what, so there is a tip.
If you want to archive in S3 after x number of days,
then use Glacier and use a backup, a life cycle policy.
So, a few Glacier opportunities to know
so you can create and delete vaults only when,
and you can only delete the vaults when it's empty.
You can retrieve metadata from your vaults.
So the creation date, number of archives,
the total size of all the archives, and so on.
And you can download the inventory of your vault,
which is a list of all the archives units,
including the archive ID, the creation date, the size,
and so on, the operations in your vault include uploads.
You upload files directly into Glacier
or you can do it by parts, if you want to use
the multi-part upload for larger archives,
and you can download files directly from your vault.
This is after you have done a retrieval job
then Glacier will prepare that file
for download and then you can download it
during the timeframe that's given to you.
Okay, and delete, if you wanted to delete,
obviously, a specific archive.
So when you restore a link, it has an expiry date.
And when you want to retrieve and create
the retrieval links, okay, you need to have,
you have three options you can do.
The first one is expedited which is the most expensive
and it gives you your file between one
to five minutes intervals so very, very quickly.
And you're going to pay 3 cents
per gigabytes and $10 per 1000 requests.
Standard, which is slower, which is three to five hours,
gives you 1 cents per gigabytes
and 3 cents per 1000 requests.
And then finally, bulk, which is those longer,
the slowest, but also the most cost-effective,
which gives you your files available
between five to 12 hours from your request,
which gives you 0.25 cents per gigabytes,
and 2.50 cents per 1000 requests.
Okay, so next Glacier is really good
because you can have vault policies and Vault Lock.
So, each vault will have one vault access policy
and one Vault Lock policy, these policies are written
in JSON, okay, and the first one is the vault access policy.
It's going to behave like an S3 bucket policy in which that,
in which that it allows you to restrict user
and accounts permissions whereas a Vault Lock policy
is a policy in which will you allow you to lock
for regulatory and compliance requirements,
your files in your Glacier vaults.
That means that the policy is going to be immutable.
It can never be changed so once it's locked,
the policy can not be changed and it's locked
for the lifetime of the policy.
And so, for example, an example of that would be
to forbid deleting an archive if less than one year old
or for example, to implement a WORM policy,
so write once, read many and to show
that compliance and regular insurance
that you can not delete even the vault,
the files within the vault, or the vault policy itself.
So, here's my vault, it has several archives.
So, the Vault Lock policy really allows you
to lockdown the archives in the vault,
as well as the Lock policy itself.
And then, the users have the permissions
to talk to the vault, but you can also regulate
that through a vault access policy
which is similar to an S3 bucket policy.
So, because glacier is asynchronous
because you have to initiate resource
and then they will happen in time in the future.
Then you need to have notification
for the restore operations so you can configure
a vault notification which is to send notifications
directly to an SNS topic when the job
of restoring is complete and then you can also
have an SNS topic when you initiate jobs.
So the idea is that Amazon Glacier has a bunch
of vaults with archives in it
and then the user will initiate or restore archive job.
It could be for example, in bulk,
so you get the result between five to 12 hours.
Now this is going to take a bit of time
so Amazon Glacier will initiate the restore of these files.
And when the archives are going to be ready
to be downloaded, then Glacier can send a notification
into an SNS topic which will notify us maybe by email
or whatever means you want and then the user can go ahead
and download the file within the timeframe allotted for it.
The other option is to use S3 Event Notification.
So, this is when you restore objects directly
from the S3 Glacier storage class, okay?
In which case you can look for two notifications.
The first one is S3 Object Restore Post which is to notify
when an object restoration has been initiated.
And the second one is S3 Object Restore Completed which is
to notify when the object restoration has been completed.
So, that's it for Glacier, I hope you liked it,
and I will see you in the next lecture.