Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29436

upload a directory to s3 with boto

$
0
0

I am already connected to the instance and I want to upload the files that are generated from my python script directly to S3. I have tried this:

import boto
s3 = boto.connect_s3()
bucket = s3.get_bucket('alexandrabucket')
from boto.s3.key import Key
key = bucket.new_key('s0').set_contents_from_string('some content')

but this is rather creating a new file s0 with the context "same content" while I want to upload the directory s0 to mybucket.

I had a look also to s3put but I didn't manage to get what I want.


Viewing all articles
Browse latest Browse all 29436

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>