Skip to content
Branch: master
Find file Copy path
Find file Copy path
4 contributors

Users who have contributed to this file

@deekoder @nitisht @wwj718 @poornas
53 lines (32 sloc) 1.77 KB

How to use AWS SDK for Python with MinIO Server Slack

aws-sdk-python is the official AWS SDK for the Python programming language. In this recipe we will learn how to use aws-sdk-python with MinIO server.

1. Prerequisites

Install MinIO Server from here.

2. Installation

Install aws-sdk-python from AWS SDK for Python official docs here

3. Example

Please replace endpoint_url,aws_access_key_id, aws_secret_access_key, Bucket and Object with your local setup in this file.

Example below shows upload and download object operations on MinIO server using aws-sdk-python.

import boto3
from botocore.client import Config

s3 = boto3.resource('s3',

# upload a file from local file system '/home/john/piano.mp3' to bucket 'songs' with 'piano.mp3' as the object name.

# download the object 'piano.mp3' from the bucket 'songs' and save it to local FS as /tmp/classical.mp3
s3.Bucket('songs').download_file('piano.mp3', '/tmp/classical.mp3')

print "Downloaded 'piano.mp3' as  'classical.mp3'. "

4. Run the Program

Downloaded 'piano.mp3' as  'classical.mp3'.

5. Explore Further

You can’t perform that action at this time.