User Tools

Site Tools


S3 Quickstart (demo)

This document is a recipe showing how to use S3 interface for first-time user. Before you start, see cli for setup. Ensure that you can authenticate and use the openstack client before proceeding.


Obtain application credentials

openstack ec2 credentials create

Test Access with S3CMD Utility

Install the s3cmd utility

python3 -m pip install --user s3cmd

Edit ~/.s3cfg to include the credentials

access_key = <ACCESS KEY>
secret_key = <SECRET KEY>
host_base =
host_bucket =


s3cmd mb S3://chudler-bucket1
s3cmd ls S3://chudler-bucket1

Test Access with Python Boto (example)

Install boto library

python3 -m pip install --user boto
import boto
access_key = '<ACCESS_KEY>'
secret_key = '<SECRET_KEY>'

conn = boto.connect_s3(
        aws_access_key_id = access_key,
        aws_secret_access_key = secret_key,
        host = '',
        port = 8000,

for bucket in conn.get_all_buckets():
            name =,
            created = bucket.creation_date,
bucket = conn.get_bucket('chudler-bucket')
# key = bucket.new_key('hello.txt')
# key.set_contents_from_string('Hello World!')

# hello_key = bucket.get_key('hello.txt')
# hello_key.set_canned_acl('public-read') # UNSAFE! WATCH OUT!
# hello_key.set_canned_acl('private')
/var/lib/dokuwiki/data/pages/cloud/recipe/s3.txt · Last modified: 2021/04/05 13:39 by chudler

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki