boto

Cast a class instance to a subclass

I'm using boto to manage some EC2 instances. It provides an Instance class. I'd like to subclass it to meet my particular needs. Since boto provides a query interface to get your instances, I need something to convert between classes. This solution seems to work, but changing the class attribute seems dodgy. Is there a better way? from ...

Downloading a Large Number of Files from S3

What's the Fastest way to get a large number of files (relatively small 10-50kB) from Amazon S3 from Python? (In the order of 200,000 - million files). At the moment I am using boto to generate Signed URLs, and using PyCURL to get the files one by one. Would some type of concurrency help? PyCurl.CurlMulti object? I am open to all s...

How to clone a key in Amazon S3 using Python (and boto)?

I have a file contained in a key in my S3 bucket. I want to create a new key, which will contain the same file. Is it possible to do without downloading that file? I'm looking for a solution in Python (and preferably boto library). ...

how do I use SonofMMM public AMI and BOTO to convert video in my existing PHP based web application

Hi all I have developed a web app that users can upload video to and have it converted. So far I have been using a LAMP based EC2 instance to upload videos to and then call a third party service to do the video conversion. The service is called using REST. The video is retrieved from the EC2 location and converted then output to an S3 b...

Disable boto logging without modifying the boto files.

I am using the Boto library to talk to AWS. I want to disable logging. (Or redirect to /dev/null or other file). I cant find an obvious way to do this. I tried this, but that doesn't seem to help. import boto boto.set_file_logger('boto', 'logs/boto.log') This says it is possible, http://developer.amazonwebservices.com/connect/thread.j...

amazon S3 boto - how to create folder?

how can i create a folder under a bucket using boto library for amazon s3, i followed the manual, and create keys with contents with permission, metadata etc, but no where in the boto's documentation say how to create folders under bucket, or create folder under folders in bucket. ...

Disabling unidentified host confirmation when connecting to Amazon EC2 instances using SSH

I am writing a script using boto and Python to automatically launch an Amazon EC2 instance and interact with it using SSH. Everything works fine except that every time I establish the connection, SSH prompts me to confirm the authenticity of the host like this: The authenticity of host 'ec2-174-129-121-25.compute-1.amazonaws.com (174.12...

How to copy a file via the browser to Amazon S3 using Python (and boto)?

Creating a file (key) into Amazon S3 using Python (and boto) is not a problem. With this code, I can connect to a bucket and create a key with a specific content: bucket_instance = connection.get_bucket('bucketname') key = bucket_instance.new_key('testfile.txt') key.set_contents_from_string('Content for File') I want to upload a file ...

How to download a file via the browser from Amazon S3 using Python (and boto) at Google App Engine?

I have a python script running inside the Google App Engine with boto 1.9b that gets all keys inside a S3-Bucket. The output is formated as a HTML-Table. bucket_instance = conn_s3.get_bucket(bucketname) liste_keys = bucket_instance.get_all_keys() table = '<table>' for i in range(laenge_liste_keys): table = table + '<tr><td>'+str(lis...

Python Boto S3 to work with Custom Domains in Amazon S3

How do I use the Python Boto library with S3 where the URL's it generate will be my CNAME'd subdomain to the Amazon S3 Server. By default it uses the default format BUCKETNAME.s3.amazonaws.com but S3 supports custom domain aliasing using CNAME (so you can have custom.domain.com -> CNAME -> custom.domain.com.s3.amazonaws.com where "cust...

Saving Python Complex Data Types to Amazon S3

Can Python class data be saved to S3 without marshalling? I am trying to cut down of I/O operations until necessary. ...

How do I install boto?

So that I am able to work with it within my python scripts? ...

Problem importing modul2s from boto

I have installed boto like so: python setup.py install; and then when I launch my python script (that imports moduls from boto) on shell, an error like this shows up: ImportError: No module named boto.s3.connection How to settle the matter? ...

Amazon S3 boto: how to rename a file in a bucket?

How to rename a file in a bucket with boto? ...

Django as S3 proxy

I extended a ModelAdmin with a custom field "Download file", which is a link to a URL in my Django project, like: http://www.myproject.com/downloads/1 There, I want to serve a file which is stored in a S3-bucket. The files in the bucket are not public readable, and the user may not have direct access to it. Now I want to avoid that ...

Amazon Web Services : Fault tolerant solution

I am using Boto library to write scripts for automating our jobs on AWS. My script actually starts a hadoop cluster using cloudera scripts and then does some customization. I am having a problem with retries. Seems like very command in my script fails once couple of days. I started adding retry to all the commands, but then the code is v...

Eclipse and python: library will import in interprer, but not in IDE

I'm running Windows 7, Python 2.6.4 and the latest version of Eclipse. I downloaded the boto library (http://code.google.com/p/boto/) and ran python setup.py install, which created boto-1.9b-py2.6.egg in C:\Python26\Lib\site-packages. Importing a class - say, by doing 'from boto.sqs.connection import SQSConnection' - works fine from th...

Selecting keys based on metadata, possible with Amazon S3?

I'm sending files to my S3 bucket that are basically gzipped database dumps. They keys are a human readable date ("2010-05-04.dump"), and along with that, I'm setting a metadata field to the UNIX time of the dump. I want to write a script that retrieve the latest dump from the bucket. That is to say I want the the key with the largest u...

Amazon S3 as secure backup without multiple invoices

I'm storing copies of database backups on Amazon S3 using the Python Boto library. But I worry that if my web server was hacked, those backups could be deleted using the credentials I need to do the upload. Ok, so I know you can grant permissions to another Amazon email address, so I can imagine doing that after an upload then removing ...

Amazon Autoscaling trigger not working, how do I debug it?

I'm trying to use autoscaling to create new EC2 instances whenever average CPU load on existing instances goes high. Here's the situation: I'm setting up autoscaling using this boto script (with keys and image names removed). http://balti.ukcod.org.uk/~francis/tmp/start_scaling_ptdaemon.nokeys.py I've got min_size set to 2, and the Au...