Amazon S3 and Amazon Glacier together: the best of both worlds for your backup strategy

When it comes to backing up your data, you just want the safest, fastest, easiest and cheapest solution available, don’t you? Unfortunately, a compromise must be made among those 4 desiderata, especially with regard to the price, which is likely to be much higher when safety, speed and ease grows too. Two solutions in the Amazon Web Services set are especially interesting to you to consider as a viable backup solution: Amazon S3 and Amazon Glacier. They are two different players with different skills, and your backup strategy should take advantage of both to balance the pros and cons of each of them. Let’s see what those services are used for and how we can make them an excellent solution for your needs.

Amazon S3: the Simple Storage Service

Amazon S3
Amazon Simple Storage Service is the most popular and used cloud file storage service offered by Amazon. It is available through interfaces like REST, SOAP and BitTorrent, and data can be retrieved and stored any time and from everywhere. Availability of data is one of the key differences between S3 and Glacier. Being a basic storage service based on a key-value approach, it is very versatile and used for many different purposes. Its most common usage is probably contents storage and distribution. You can distribute your content directly from Amazon S3 or integrate it with other solutions like Amazon CloudFront. Since you don’t pay for data sent from S3 to EC2 it’s great to store data for computation and other analytics. Taking advantage of his elastic scalability and pay-as-you-go pricing, it is great to host static content for websites as well. And, of course, it’s a great solution for backing up and archiving data.

Amazon Glacier: freeze and forget your data

 
Amazon Glacier
Amazon Glacier is a dedicated solution for data backup which leverages an aggressive pricing and durability of data trading off speed and availability time for your data. In fact, Amazon Glacier is optimized for data that is infrequently accessed and for which retrieval times of several hours are suitable. Amazon hasn’t revealed many insights about how Glacier works under the hood. Despite the data retrieval time, in the order of several hours, is similar to the delays of tape-based systems, the general consensus (mostly based on rumors) is that Glacier is not tape-based, rather it runs on high-capacity low-cost hard disks, possibly low-RPM hard drives used in custom racks with proprietary logic. Details you probably don’t care about that much if you consider the incredible price of 0.01$ per GB per month and a declared durability of 99.999999999%, which makes Glacier a great solution for (very-) long term data archiving and backup.

The best of both worlds

So, it’s clear that S3 and Glacier are two very different worlds. Speed and immediate availability on a side, ridiculous price and rock-solid archiving on the other. Chances are you will like all those features for a high-efficiency backup strategy, so why not taking advantage of both the services? Amazon makes the process very easy, since S3 has a native feature for long term archiving of objects on Glacier.
First of all, you need to set up a lifecycle rule in the AWS Management Console to tell S3 which objects are to be archived to Glacier and under what conditions. In this rule, you specify which objects in the bucket are subject to the policy, a timing for transitioning objects to Glacier and an object age at which the object will be deleted from S3. Every day, S3 will evaluate the policies and act accordingly. If an object is successfully archived to Glacier, the object’s data will be removed from S3 but its index entry will remain as is, and its storage class will be set to GLACIER.
Now, if you need to see what S3 objects are stored using Glacier, you can get it using S3’s LIST API, just like you are already used to do. What is slightly different is the process to retrieve an object. You can’t just GET it, you must RESTORE it from Glacier, wait for the usual 3-5 hours for the object to be unfrozen, then the object will stay available to you for a retention period you defined during the RESTORE operation itself. Once this period is over, the object will be removed from S3, but will remain in Glacier indefinitely. If you are wondering if you can retrieve objects using Glacier’s API, answer is: you can’t, since they have been stored there via S3 and the mapping between you user-defined object name and the Glacier system-defined identifier is managed by S3 itself.

Written by

Software Engineer with a solid focus on QA and an extensive experience in ICT. Above all, Andrea has a very strong interest in Free and Open Source Software, and he is a Debian and Ubuntu Developer since years. Non-tech interests include: Rugby, Jazz music and Cooking.

Related Posts

— November 26, 2018

New Amazon S3 Features Announced at re:Invent

In true AWS style, a number of new features and services were announced yesterday, the day before the official start of re:Invent.Three of these announcements were related to Amazon S3 which included: S3 Intelligent Tiering (A new storage class) Batch Operations for Object M...

Read more
  • Amazon S3
  • Amazon Web Services
  • re:Invent 2018
  • S3
— November 10, 2018

S3 FTP: Build a Reliable and Inexpensive FTP Server Using Amazon’s S3

Is it possible to create an S3 FTP file backup/transfer solution, minimizing associated file storage and capacity planning administration headache?FTP (File Transfer Protocol) is a fast and convenient way to transfer large files over the Internet. You might, at some point, have conf...

Read more
  • Amazon S3
  • AWS
— September 26, 2018

How to Optimize Amazon S3 Performance

Amazon S3 is the most common storage options for many organizations, being object storage it is used for a wide variety of data types, from the smallest objects to huge datasets. All in all, Amazon S3 is a great service to store a wide scope of data types in a highly available and resil...

Read more
  • Amazon S3
  • AWS
— February 13, 2018

Cloud Academy Sketches: Encryption in S3

Some of 2017’s largest data breaches involved unprotected Amazon Simple Storage (S3) buckets that left millions of customer data records exposed to the public. The problem wasn’t the technology, but administrators who improperly configured the security settings.For cloud teams in char...

Read more
  • Amazon S3
  • AWS
— January 3, 2018

How to Diagnose Cancer with Amazon Machine Learning

A common question in the medical field is:Is it possible to distinguish one class of samples from another, based on some set of measurements?Research investigating this and related medical questions have spurred innovation in medicine and the application of statistical methods and m...

Read more
  • Amazon S3
  • AWS
— November 30, 2017

AWS re:Invent 2017 Day 3. Amazon Rekognition Video Enables Object and Face Recognition

From the 22 new features released by AWS today at re:invent 2017, Amazon Rekognition Video stood out to me as the interesting “quiet achiever” I want to tell you about.Amazon Rekognition Video brings object and facial recognition to live and on-demand video content. With this innovati...

Read more
  • Amazon S3
  • AWS
  • reInvent17
— August 10, 2017

Using Amazon Athena to query S3 data for CloudTrail logs

Who is Athena again? Athena is the Greek goddess of wisdom, craft, and war. (But at least she had a calm temperament, and only fought for a just cause!) This post is about Amazon Athena and about using Amazon Athena to query S3 data for CloudTrail logs, however, and I trust it will brin...

Read more
  • Amazon Athena
  • Amazon S3
  • AWS
  • CloudTrail
— April 7, 2016

A Crash Course in Amazon Serverless Architecture: Discover the Power of Amazon API Gateway, Lambda, CloudFront, and S3

New expanded content showing all three AWS Serverless posts in one article. This is a detailed look at the components of AWS Serverless Architecture and how anyone can make the most of it. Because of the complexity of the subject, this post has been subdivided into 3 sections, each with...

Read more
  • Amazon S3
  • AWS
— February 2, 2016

Amazon S3 Security: master S3 bucket polices and ACLs

Learn about Bucket Policies and ways of  implementing Access Control Lists (ACLs) to restrict/open your Amazon S3 buckets and objects to the Public and other AWS users.Follow along and learn ways of ensuring the public only access for your S3 Bucket Origin via a valid CloudFront reques...

Read more
  • Amazon S3
  • AWS
— September 11, 2015

Riak CS: a cloud storage solution compatible with Amazon S3

Riak CS is an open source cloud storage technology compatible with Amazon S3 and Openstack Swift. Discover why more and more companies are using it.Riak CS may not be the best known cloud storage technology right now, but it's definitely worthy of our attention. This post isn't meant ...

Read more
  • Amazon S3
  • AWS
— June 10, 2015

VPC Endpoint for Amazon S3: simple connectivity from AWS

Lets discuss VPC Endpoint's value, common use cases, and how to get it up and running with the AWS CLI.Last month Amazon Web Services introduced VPC Endpoint for Amazon S3. In this article I am going to explain exactly what this means, how it will change - and improve - the way AWS re...

Read more
  • Amazon S3
  • AWS
— February 17, 2015

Amazon S3 vs Amazon Glacier: A Simple Backup Strategy In The Cloud

Amazon S3 vs Amazon Glacier: which AWS storage tool should you use?When you set out to design your first AWS (Amazon Web Services) hosted application, you will need to consider the possibility of data loss.While you may have designed a highly resilient and durable solution, this w...

Read more
  • Amazon S3
  • AWS