@bp.route('/ec2/keypair/download/<name>', methods=['GET'])
@login_required
def download_keypair(name):
    kp = download_key_pair(g.user.account, name)
    return Response(kp['KeyMaterial'], mimetype='application/x-binary')
@bp.route('/ec2/keypair/download/<name>', methods=['GET'])
@login_required
def download_keypair(name):
    kp = download_key_pair(g.user.account, name)
    return Response(kp['KeyMaterial'], mimetype='application/x-binary')