-->
Navigation
Python AWS Cookbook

Python AWS Cookbook

Now pay Easier and Secure using Paypal
Price:

Read more

Managing Your Cloud with Python and Boto

by Mitch Garnaat


e-books shop
e-books shop
Purchase Now !
Just with Paypal



Book Details
 Price
 2.00
 Pages
 74 p
 File Size 
 4,700 KB
 File Type
 PDF format
 ISBN
 978-1-449-30544-4 
 Copyright©   
 2012 Mitch Garnaat 

Preface
My first experience with Amazon Web Services was on March 14, 2006. I had seen a
press release announcing a new web-based storage service called Simple Storage Service
(S3), and I remember thinking how strange it seemed that Amazon would be offering
such a service. Nevertheless, I signed up for an account and started reading the
documentation.

I was blown away by S3. The simple, affordable pricing model. The elegant REST API.
The virtually unlimited storage capacity. Amazing. The only thing that could make this
any better, I thought to myself, would be a Python interface! That day I started coding
what would become the boto library, which is what we will use in this book to interface
with Amazon Web Services.

I still believe that Python is a great language for interacting with AWS and other cloud
services. The fantastic standard libraries that come with all Python installations (Batteries
Included!), the vast collection of modules available for quick download via the
Python Cheese Shop, and the ability to work interactively with cloud services, trying
requests and immediately seeing the results, combine to provide a powerful and fun
way to develop applications and control your cloud-based infrastructure.

I've always found that the best way to learn something new is to see lots of examples.
That’s what this little book will focus on: solutions to many common problems related
to EC2 and S3 (using Python and boto). I hope you find it useful!

Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
1. General Info . .. . . . . . . . . 1
1.1 A Quick Note About Python 1
1.2 Installing boto 1
1.3 Getting Started with Amazon Web Services 4
1.4 Using boto with Eucalyptus 7
1.5 Using boto with Google Cloud Storage 8
1.6 Finding Available Regions for AWS 9
1.7 Enabling Debug Output with boto 10
1.8 Controlling Socket Timeouts in boto 10
2. EC2 Recipes . . . .  . . . . . . . . 11
2.1 Launching an Instance 11
2.2 Keeping Track of Instances with Tags 15
2.3 Accessing the Console Log 17
2.4 Uploading Your Own SSH Keypair 17
2.5 Synchronizing SSH Keypairs Across EC2 Regions 18
2.6 Associate an Elastic IP Address with an Instance 19
2.7 Attach a Persistent EBS Volume to an Instance 20
2.8 Back Up Your EBS Volumes 22
2.9 Restore a Volume from a Snapshot 23
2.10 Clone an Existing Instance 24
2.11 Find All Running EC2 Instances 26
2.12 Monitoring the Performance of Your Instance 27
2.13 Getting Notifications 31
2.14 Storing Custom Data in CloudWatch 36
2.15 Executing Custom Scripts upon Instance Startup 37
3. S3 Recipes . . . . .. . . . . . . . . . . . 47
3.1 Create a Bucket 47
3.2 Create a Bucket in a Specific Location 48
3.3 Store Private Data 49
3.4 Store Metadata with an Object 50
3.5 Computing Total Storage Used by a Bucket 52
3.6 Copy an Existing Object to Another Bucket 53
3.7 Modify the Metadata of an Existing Object 54
3.8 Find Out Who Is Accessing Your Data 54
3.9 Reduce the Cost of Storing Noncritical Data 56
3.10 Generating Expiring URLs for S3 Objects 57
3.11 Preventing Accidental Deletion of Data from S3 58
3.12 Hosting Static Websites on S3 60
3.13 Uploading Large Objects to S3 61


Bookscreen
e-books shop

Introduction
Editors: Julie Steele and Meghan Blanchette
Production Editor: Teresa Elsey
Cover Designer: Karen Montgomery
Interior Designer: David Futato
Illustrator: Robert Romano

Revision History for the First Edition:
2011-10-21 First release

0