Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running Boto on Google App Engine (GAE)

I'm new to Python and was hoping for help on how to 'import boto.ec2' on a GAE Python application to control Amazon EC2 instances. I'm using PyDev/Eclipse and have installed boto on my Mac, but using simply 'import boto' does not work (I get: : No module named boto.ec2). I've read that boto is supported on GAE but I haven't been able to find instructions anywhere. Thanks!

like image 435
Dan Avatar asked Apr 08 '13 21:04

Dan


2 Answers

It sounds like you haven't copied the boto code to the root of your app engine directory.

Boto works with GAE but Google doesn't supply you with the code. Once you copy it into the root of your GAE directory, the dev server should work, and after your next upload it will work on the prod server as well.

like image 67
gaefan Avatar answered Sep 21 '22 02:09

gaefan


Symbolic link should be enough. in your project root:

ln -s /path/to/boto/boto boto

Google app engine will upload it while deploying your app.

like image 29
AlSayed Gamal Avatar answered Sep 18 '22 02:09

AlSayed Gamal