You are previewing Python and AWS Cookbook.

Python and AWS Cookbook

Cover of Python and AWS Cookbook by Mitch Garnaat Published by O'Reilly Media, Inc.
  1. Python and AWS Cookbook
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. Preface
      1. Conventions Used in This Book
      2. Using Code Examples
      3. Safari® Books Online
      4. How to Contact Us
    3. 1. General Info
      1. A Quick Note About Python
      2. Installing boto
      3. Getting Started with Amazon Web Services
      4. Using boto with Eucalyptus
      5. Using boto with Google Cloud Storage
      6. Finding Available Regions for AWS
      7. Enabling Debug Output with boto
      8. Controlling Socket Timeouts in boto
    4. 2. EC2 Recipes
      1. Launching an Instance
      2. Keeping Track of Instances with Tags
      3. Accessing the Console Log
      4. Uploading Your Own SSH Keypair
      5. Synchronizing SSH Keypairs Across EC2 Regions
      6. Associate an Elastic IP Address with an Instance
      7. Attach a Persistent EBS Volume to an Instance
      8. Back Up Your EBS Volumes
      9. Restore a Volume from a Snapshot
      10. Clone an Existing Instance
      11. Find All Running EC2 Instances
      12. Monitoring the Performance of Your Instance
      13. Getting Notifications
      14. Storing Custom Data in CloudWatch
      15. Executing Custom Scripts upon Instance Startup
    5. 3. S3 Recipes
      1. Create a Bucket
      2. Create a Bucket in a Specific Location
      3. Store Private Data
      4. Store Metadata with an Object
      5. Computing Total Storage Used by a Bucket
      6. Copy an Existing Object to Another Bucket
      7. Modify the Metadata of an Existing Object
      8. Find Out Who Is Accessing Your Data
      9. Reduce the Cost of Storing Noncritical Data
      10. Generating Expiring URLs for S3 Objects
      11. Preventing Accidental Deletion of Data from S3
      12. Hosting Static Websites on S3
      13. Uploading Large Objects to S3
    6. About the Author
    7. SPECIAL OFFER: Upgrade this ebook with O’Reilly
O'Reilly logo

Installing boto

The examples in this book require boto version 2.1 or later. There are several options available to you when it comes to installing boto.

Download and Install from

The boto project uses github as its source code repository. You can clone our github repo locally and install boto from that cloned distribution. By doing so, you will always have access to the very latest changes in boto. That includes the newest features, as well as the newest bugs, so you will have to decide if this intrepid path is for you or not:

	% git clone
	% cd boto
	% sudo python install

Manually Download and Install boto

The Python Cheese Shop is the official repository of Python packages. If you go to the Cheese Shop (also known as PyPI) and search for boto, you will see a page like Figure 1-1, although it should be for version 2.1, not 2.0.

boto Page on PyPI

Figure 1-1. boto Page on PyPI

Clicking on the boto-2.1.tar.gz link will download the compressed tarball containing the source package for boto. Save this file on your local machine and follow this process to install from the source package:

	% tar xfz boto-2.1.tar.gz
	% cd boto-2.1
	% sudo python install

Installing boto with easy_install

The easy_install utility makes it easy (of course!) to find, install, upgrade, and uninstall Python packages. Before you can use the nice features of easy_install, you first need ...

The best content for your career. Discover unlimited learning on demand for around $1/day.