7

I am new to Amazon Glacier. I have succesfully created a vault and uploaded some archives. In the management console I can only see the name of the vault and that it contains 4 archives, taking up 4.2 GiB. But I simply can't find a way to list the archives in the vault. Subsequently I need to delete the archives as the contain wrong data.

I have looked and googled for more than an hour but still I can see no way of listing the content of a vault.

1
  • An alternative way of using Glacier is to upload your files to an S3 bucket instead, and set up an object lifecycle policy which causes the files in S3 to be transitioned to Glacier automatically after a given number of days. These glacier-storage-class S3 files will still appear as objects in the S3 bucket, so working with them is easy. When you want to actually read one of the files, you can initiate a "restore" from Glacier which will convert them back to a regular S3 object for a specified number of days. May 23, 2017 at 4:05

2 Answers 2

5

Amazon Glacier data isn't really meant to be accessed on a whim. It takes considerable time to pull data out of a vault.

I'd recommend using CloudBerry Explorer. It's free and for the most part seems to work.

After installing, you'll need to add your Glacier account.

enter image description here

Double click New account and add a display name (can be whatever you want):

enter image description here

To grab your access and secret keys, navigate to https://portal.aws.amazon.com/gp/aws/securityCredentials or click your account name and select Security Credentials. enter image description here

Copy and paste those in to the new account and there you go. Now right click your vault and hit Get Inventory. Wait some hours and enjoy. enter image description here

1

Inside the AWS console panel, there is no way to get the contents of a vault. You have to use an SDK or pre-packaged software to access this information. In my answer, I am using the PHP SDK v3 with Composer though this code can be adapted to other languages like Java. The key is to use the InitiateJob API function with Type set to inventory-retrieval. The following code will need to be modified to suit your particular case.

require('/Users/Parag/Tetragy/vendor/autoload.php');
use Aws\Glacier\GlacierClient;
$glacierClient = GlacierClient::factory(array('profile' => 'default', 'region'  => 'us-east-1', 'version' => '2012-06-01'));
print $result = $glacierClient->initiateJob(array('jobParameters' => array('InventoryRetrievalParameters' => array('StartDate' => '2015-09-01T00:00:00Z', 'EndDate' => '2015-09-10T00:00:00Z'), 'Type' => 'inventory-retrieval'), 'vaultName' => 'MYVAULTNAME'));

The last line above will print a Job ID to the command line. I'm still waiting for my job to finish though I plan to use the following code to get the vault inventory:

print $result = $glacierClient->getJobOutput(array('jobId' => 'MYJOBIDHERE', 'vaultName' => 'MYVAULTNAME'));

You can read about the initiateJob in AWS Documentation

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .