cluster launch fail - The key pair 'ampcamp' does not exist
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>
Could you check a couple of things
- 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)
- If so can you check if the keypair is present in the us-east region ?
- keypair 'ampcamp' is present in the EC2 console.
- The region is us-west (Oregon)
Creating key in us-east solved the problem. Thanks!
Yes, I also meet the same problem, after I change the region to us-east it works, thanks!
how do you change the region?
-r us-west-2
Where did you do this?