sysadmin

Life in the digital trenches

WebService::Amazon::Glacier

GitHub

CPAN

Status

Very early release. This module is not actively maintained. If you wish to use it, please let me know and I’ll get it updated This version only provides for interaction with vaults. The following apis are implemented:

  • Create Vault (PUT vault)
  • Delete Vault (DELETE vault)
  • Describe Vault (GET vault)
  • List Vaults (GET vaults)
  • Set Vault Notification Configuration (PUT notification-configuration)
  • Get Vault Notifications (GET notification-configuration)
  • Delete Vault Notifications (DELETE notification-configuration)

The following apis are not implemented:

  • Upload Archive (POST archive)
  • Delete Archive (DELETE archive)
  • Initiate Multipart Upload (POST multipart-uploads)
  • Upload Part (PUT uploadID)
  • Complete Multipart Upload (POST uploadID)
  • Abort Multipart Upload (DELETE uploadID)
  • List Parts (GET uploadID)
  • List Multipart Uploads (GET multipart-uploads)
  • Initiate a Job (POST jobs)
  • Describe Job (GET JobID)
  • Get Job Output (GET output)
  • List Jobs (GET jobs)

This module won’t be useful in any real sense until the following apis are implemented:

  • Upload Archive (POST archive)
  • Initiate a Job (POST jobs)
  • Get Job Output (GET output)

In other words, it isn’t able to upload or download archives yet.

Description

The primary focus of this module is to provide a command line interface to Amazon’s Glacier service.

Glacier is a slow, low cost, durable storage system targeted at large archives. You can think of it as a tape library in the cloud. My interest in it is as an offsite storage location for large, infrequently used files like videos and photos. I currently use Amazon’s S3 for this, but Glacier will be 1/10th the cost.

Right now, the script provided by this module is capable of all Vault actions. Here is a subset:

dartagnan:~ cwimmer$ glacier list_vaults --config ~/.amazon.cwimmer.yaml --region us-west-1
dartagnan:~ cwimmer$ glacier create_vault --config ~/.amazon.cwimmer.yaml --region us-west-1 --vaultname testvault
dartagnan:~ cwimmer$ glacier list_vaults --config ~/.amazon.cwimmer.yaml --region us-west-1
testvault
dartagnan:~ cwimmer$ glacier delete_vault --config ~/.amazon.cwimmer.yaml --region us-west-1 --vaultname testvault
dartagnan:~ cwimmer$ glacier list_vaults --config ~/.amazon.cwimmer.yaml --region us-west-1

A significant portion of the work on this module is actually in a separate distribution. Glacier uses a new method of signing requests that wasn’t yet implemented in Perl when I started this project. Therefore I produced Net::Amazon::SigningVersion4 to solve this problem.

The config file contains my credentials. If you don’t want to create a YAML file for this, you can pass them on the command line. If you want the modules to read credentials from the environment, please open an issue on GitHub.

The modules use MooseX::App::Plugin::Config for configuration information. Therefore any part of the config may be passed in on the command line, by config file, or to the constructor of the objects.