- Spark comes bundled with scripts to launch the Spark cluster on Amazon EC2. Let's launch the cluster using the following command:
$ cd /home/hduser$ spark-ec2 -k <key-pair> -i <key-file> -s <num-slaves> launch <cluster-name><key-pair> - name of EC2 keypair created in AWS<key-file> the private key file you downloaded<num-slaves> number of slave nodes to launch<cluster-name> name of the cluster
- Launch the cluster with the example value:
$ spark-ec2 -k kp-spark -i /home/hduser/keypairs/kp-spark.pem --hadoop-major- version 2 -s 3 launch spark-cluster
- Sometimes, the default availability zones are not available; in that case, retry sending the request by specifying the specific availability zone you are requesting: