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