Python and AWS Cookbook

Errata for Python and AWS Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Page 13

Thanks for the excellent guide. It would be great to check that key_dir (~/.ssh/) exists and create it if not. I added a user to my machine for this guide, so saving the "paws.pem" file failed, and I got in a bit of a loop trying to figure out how to get a new paws SSH key. Eventually I figured out that I could create ~/.ssh/ myself, go into the web-based AWS Management Console and delete the "paws" keypair and then it would work.

Note from the Author or Editor:
Thanks for the report and for the useful suggestion. I have created an issue on github to track it and will fix it very soon:

Joshua Franklin  Feb 01, 2012 
Page 16
example 2.2

I believe there is an error in the 2.2 example

After I run:

When I run
reservations = ec2.get_all_instances(filters={'paws' : None})
I get the error:

EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidParameterValue</Code><Message>The filter 'paws' is invalid</Message></Error></Errors><RequestID>6b910de2-82a4-4645-81c1-cf7858327638</RequestID></Response>

If I change it to:
reservations = ec2.get_all_instances(filters={'tag:paws' : ""})

It works fine.

Note from the Author or Editor:
I believe the description above is correct and quite clear. The change needs to be made in the source code rather than the book text.

Anonymous  Nov 15, 2011 
Printed, PDF,
Page 55
Example 3-6

The error is actually in the source code for Example 3-6. The copy_object function takes a parameter called preserve_metadata but later the function refers to preserve_acl. The corrected version of this code can be found at:

Mitch Garnaat
Dec 09, 2011