@bp.route('/ec2/<id>', methods=['GET'])
@login_required
def instance(id):
    instance = describe_instace(g.user.account, id)
    if (not instance):
        abort(404, 'instance not found')
    instance_object = EC2Instance(instance)
    return render_template('compute/ec2_instance.html', i=instance_object, state_map=EC2_STATE_MAP)
@bp.route('/ec2/<id>', methods=['GET'])
@login_required
def instance(id):
    instance = describe_instace(g.user.account, id)
    if (not instance):
        abort(404, 'instance not found')
    instance_object = EC2Instance(instance)
    return render_template('compute/ec2_instance.html', i=instance_object, state_map=EC2_STATE_MAP)