S3 Tools is a set of tools to access your CDN Object Storage through the Linux command-line
Contents
Supported OS
Apple OS-X, Linux
Dependencies: python 2.6 or higher version of python 2
Installing s3tools for use with CDN Object Storage
Download: http://s3tools.org/download
Apple OS-X
dependencies: (needs brew to be installed)
brew install s3cmd
apt based linux distributions
sudo apt-get install s3cmd
rpm based linux distributions
yum install s3cmd
python on all platforms
pip install --update s3cmd
Configure s3tools for use with CDN Object Storage
-
Configure s3tools
s3cmd --configure
Information
You will be asked to enter your access and secret key and if you want to use HTTP or HTTPS
HTTPS is an encrypted version of HTTP, protecting your data against eavesdroppers while they’re in transit to and from Leaseweb Cloudstorage.The configure option creates a .s3cfg in your current directory, but needs some adjustments, so open up with your favorite text editor (read: vim)
host_base still points to amazon, so change to
- host_base = cloudstorage.nl.Leaseweb.com
host_bucket still points to amazon, so change to
- host_bucket = %(bucket)s.cloudstorage.nl.Leaseweb.com
-
Configuration items that are not mandatory, but are handy for large transfers
Multipart uploads enable_multipart = True multipart_chunk_size_mb = 15
Enter credential to authenticate with CDN Object Storage
- Fill in the following fields.
-
- Access Key ID
-
Secret Access Key
Information
You will have received your credentials by email.
Using s3tools for use with CDN Object Storage
-
List your buckets
s3cmd ls
Information
As you have just started using S3 there are no buckets owned by you as of now.
So the output will be empty. -
Create your bucket with.
s3cmd mb s3://my-new-bucket-name
Bucket names must be unique amongst all users of S3. That means the simple names like “test” or “asdf” are already taken and you must make up something more original.s3cmd mb s3://ilikepizza-test
Bucket 'ilikepizza-test' created
-
List your bucket
~$ s3cmd ls 2007-01-19 01:41 s3://ilikepizza-test List the contents of the bucket
-
Upload to your bucket
~$ s3cmd put addressbook.xml s3://ilikepizza-test/addrbook.xml File 'addressbook.xml' stored as s3://ilikepizza-test/addrbook.xml (123456 bytes)