boto/boto — pull request #1698 by ftzeng (2013-08-31 03:38:33+00:00)
Title: EC2 UserData encoding fix

I was trying to pass some user data while creating a new instance with the EC2Connection's `run_instances`, but kept receiving a `400 Bad Request` error.

After a bit of digging, it turned out to be because the passed user data is Base64 encoded (as it needs to be), but the Base64 string needs to be UTF-8 to be passed as part of the request parameters. `b64encode` outputs a byte string, so this fix just required adding a `decode('UTF-8')` to the end of things.