diff --git a/ec2/spark_ec2.py b/ec2/spark_ec2.py
index 0a8d6ca5d75195f5591d53ea426c0bf358d1aa66..4c5a99f5f6b2ea8d489fee74256afdb0d8edf96f 100755
--- a/ec2/spark_ec2.py
+++ b/ec2/spark_ec2.py
@@ -443,7 +443,7 @@ def setup_cluster(conn, master_nodes, slave_nodes, opts, deploy_ssh_key):
 
   # NOTE: We should clone the repository before running deploy_files to
   # prevent ec2-variables.sh from being overwritten
-  ssh(master, opts, "rm -rf spark-ec2 && git clone https://github.com/mesos/spark-ec2.git -b v2")
+  ssh(master, opts, "rm -rf spark-ec2 && git clone https://github.com/mesos/spark-ec2.git -b v3")
 
   print "Deploying files to master..."
   deploy_files(conn, "deploy.generic", opts, master_nodes, slave_nodes, modules)