Add region parameter and changed connection code.
Merge pull request #2746 from lwade/ec2region

Add region parameter and changed connection code.