blob: 5df07689caac9cfebcb8c52ee3e5c0ef21de40f1 [file] [log] [blame]
import os
import json
class AwsException(Exception):
pass
def aws_run(cmd):
cmd = 'aws %s'%cmd
pipe = os.popen(cmd)
output_str = pipe.read()
if (not pipe.close()):
output = json.loads(output_str)
return output
else:
raise AwsException("Error: %s"%output_str)