Skip to content

Instantly share code, notes, and snippets.

@voluntas
Created September 15, 2012 03:09
Show Gist options
  • Save voluntas/3726208 to your computer and use it in GitHub Desktop.
Save voluntas/3726208 to your computer and use it in GitHub Desktop.
boto/glacier サンプル
import sys
from boto.glacier import connect_to_region
"""
$ python upload.py /path/to/file
"""
REGION = 'ap-northeast-1'
VAULT = 'spam'
def main(path):
layer2 = connect_to_region(REGION)
v = layer2.get_vault(VAULT)
# 並列で処理したい場合はこちら
# v.concurrent_create_archive_from_file(path)
v.create_archive_from_file(path)
if __name__ == '__main__':
path = sys.argv[-1]
main(path)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment