#!/usr/bin/env python # -*- coding:utf-8 -*- import boto import boto.s3.connection conn = boto.s3.connect_to_region( region, aws_access_key_id, aws_secret_access_key, is_secure=True, calling_format=boto.s3.connection.OrdinaryCallingFormat() ) bucket = conn.get_bucket(BUCKET-NAME) key = bucket.get_key(KEY_NAME) print key.get_contents_as_string()