Install s3cmd

This post is part of my Your own Virtual Private Server hosting solution project.
Get the latest version of this article here: https://gist.github.com/9548802.

Introduction

S3cmd is a command line tool for uploading, retrieving and managing data in Amazon S3 and other Cloud Storage Service Providers that use the S3 protocol

Requirements

Installation

Install the package with aptitude.

sudo apt-get install s3cmd

Configure s3cmd.

s3cmd --configure

Enter your Amazon AWS credentials.

Access Key: [your access key]
Secret Key: [your secret key]

Enter an encryption passwort for secure transmissions.

Encryption password: [secure password]

Answert the next prompts as showed below.

Path To GPG programm: [enter]
Use HTTPS protocol [No]: [enter]
HTTP Proxy server name: [depends on your network environment]
Test access with supplied credentials: Y

If you’ll get the following message.

Error: Test failed: 4103 (AccessDenied): Access Denied

Try my policy.

{
  "Statement": [
    {
      "Action": [
        "s3:ListAllMyBuckets"
      ],
      "Effect": "Allow",
      "Resource": "arn:aws:s3:::*"
    },
    {
      "Action": [ 
          "s3:ListBucket", 
          "s3:PutObject",
          "s3:GetObject"
      ],
      "Effect": "Allow",
      "Resource": [
          "arn:aws:s3:::[bucket name]", 
          "arn:aws:s3:::[bucket name]/*"
      ]
    }
  ]
}

Source

s3cmd website

Leave a Reply