s3cl - Command line for Amazon s3 cloud storage
s3cl command [options]
s3cl buckets s3cl mkbucket --bucket some_bucket_name --jurisdiction [EU|US] s3cl ls <bucket>:[prefix] s3cl cp <bucket>:<key> /path/[filename] s3cl sync <bucket>:[prefix] /path/ s3cl rm <bucket>:<key> Options: -help brief help message -man full documentation We take NO responsibility for the costs incured through using this script. To run this script, you need to set a pair of environment variables: AWS_ACCESS_KEY_ID AWS_ACCESS_KEY_SECRET
This program gives a command line interface to Amazons s3 storage service. It does not limit the number of requests (which may cost you more money than if you did it a different way!) and each request costs Money (although some costs from EC2 may be $0.0, check latest from Amazon costs page) - we take NO reponsibility for your bill.
List all buckets for this account.
s3cl mkbucket --bucket sombucketname [--jurisdiction [EU|US]]
Create a new bucket, optionally specifying what jurisdiction it should be created in.
s3cl ls <bucket>:[prefix]
List contents of a bucket, the optional prefix can be partial, in which case all keys matching this as the start of the key name will be returned. If no prefix is supplied all keys of the bucket will be returned.
s3cl cp <bucket>:<key> target_file
s3cl cp <bucket>:<key> target_directory
Copy a single key from the bucket to the target file, or into the target_directory.
s3cl sync <bucket>:[prefix] target_dir
Downloads all files matching the prefix into a directory structure replicating that of the prefix and all 'sub-directories'. It will download ALL files - even if already on your local disk:
# Data transfer "in" and "out" refers to transfer into and out # of Amazon S3. Data transferred between Amazon EC2 and # Amazon S3, is free of charge (i.e., $0.00 per GB), except # data transferred between Amazon EC2 and Amazon S3-Europe, # which will be charged at regular rates.
s3cl rm <bucket>:<key>
Remove a key(file) from the bucket, removing a non-existent file is not classed as an error. Once removed the key (file) can not be restored - so use with care!
This module contains code modified from Amazon that contains the following notice (which is also applicicable to this code):
# This software code is made available "AS IS" without # warranties of any kind. You may copy, display, modify and # redistribute the software code either by itself or as incorporated # into your code; provided that you do not remove any proprietary # notices. Your use of this software code is at your own risk and # you waive any claim against Amazon Digital Services, Inc. or its # affiliates with respect to your use of this software code. # (c) 2006 Amazon Digital Services, Inc. or its affiliates.
Leo Lapworth <LLAP@cuckoo.org> - Part of the HinuHinu project