training icon indicating copy to clipboard operation
training copied to clipboard

cluster launch fail - The key pair 'ampcamp' does not exist

Open vijaygkd opened this issue 13 years ago • 6 comments

I am trying to spin up a EC2 cluster for the Big-data mini course. I am using the following reference for setting up the cluster. http://ampcamp.berkeley.edu/3/exercises/launching-a-bdas-cluster-on-ec2.html

When I run the shell script spark-ec2 I get an error saying The key pair 'ampcamp' does not exist

I launched an EC2 instance myself and tried to ssh to it using the 'ampcamp' key and was successfully able to. Also I made sure that the access key ID and security access key are correct and active.

Following is the error message:

Vijay:training-scripts Vijay$ ./spark-ec2 -i ampcamp.pem -k ampcamp --copy launch amplab-training
Setting up security groups...
Searching for existing cluster amplab-training...
Latest Spark AMI: ami-452f622c
Launching instances...
ERROR:boto:400 Bad Request
ERROR:boto:<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidKeyPair.NotFound</Code><Message>The key pair 'ampcamp' does not exist</Message></Error></Errors><RequestID>1abf9409-0bce-46ec-b9a6-1cecc0d173ac</RequestID></Response>
Traceback (most recent call last):
  File "./spark_ec2.py", line 915, in <module>
    main()
  File "./spark_ec2.py", line 754, in main
    conn, opts, cluster_name)
  File "./spark_ec2.py", line 319, in launch_cluster
    block_device_map = block_map)
  File "/Users/Vijay/Desktop/spark/training-scripts/third_party/boto-2.4.1.zip/boto-2.4.1/boto/ec2/image.py", line 255, in run
  File "/Users/Vijay/Desktop/spark/training-scripts/third_party/boto-2.4.1.zip/boto-2.4.1/boto/ec2/connection.py", line 678, in run_instances
  File "/Users/Vijay/Desktop/spark/training-scripts/third_party/boto-2.4.1.zip/boto-2.4.1/boto/connection.py", line 925, in get_object
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidKeyPair.NotFound</Code><Message>The key pair 'ampcamp' does not exist</Message></Error></Errors><RequestID>1abf9409-0bce-46ec-b9a6-1cecc0d173ac</RequestID></Response>

vijaygkd avatar Sep 05 '13 06:09 vijaygkd

Could you check a couple of things

  1. Is there keypair named 'ampcamp' that shows up in the EC2 web ui (similar to something like http://ampcamp.berkeley.edu/3/exercises/img/aws-keypair.png)
  2. If so can you check if the keypair is present in the us-east region ?

shivaram avatar Sep 05 '13 07:09 shivaram

  1. keypair 'ampcamp' is present in the EC2 console.
  2. The region is us-west (Oregon)

Creating key in us-east solved the problem. Thanks!

vijaygkd avatar Sep 05 '13 07:09 vijaygkd

Yes, I also meet the same problem, after I change the region to us-east it works, thanks!

caikehe avatar Apr 17 '15 16:04 caikehe

how do you change the region?

birdmw avatar Sep 03 '15 23:09 birdmw

-r us-west-2

base698 avatar Jan 21 '16 00:01 base698

Where did you do this?

felixleopoldo avatar Apr 13 '18 13:04 felixleopoldo