ec2 module: tidy up to meet PEP8 better
Merge pull request #2470 from felixonmars/ec2-tidy

ec2 module: tidy up to meet PEP8 better. Fixes #2470.