User Tools

Site Tools


This is an old revision of the document!

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)

import boto
import boto.s3.connection
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 = '',
        calling_format = boto.s3.connection.OrdinaryCallingFormat(),

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/attic/cloud/recipe/s3.1617646900.txt.gz · Last modified: 2021/04/05 13:21 by chudler

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki