Giới thiệu sách python: Python & AWS Cookbook - TL

python and aws cookbook
 Python & AWS Cookbook
Mitch Garnaat

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
iii
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