ec2 module: tidy up to meet PEP8 better

Only style changes, plus some omitting of non-functional uneeded imports, and fixed a missing port for "raw_input".