moved ec2 functions to ec2.py