1

I have set .mrjob.conf like this (passwords changed):

runners: emr: aws_access_key_id: JKDJKAJSLKJAFKLJ aws_secret_access_key: RKLJDKAS/KLASJKFJKSJAKSALLKLKS ec2_key_pair: me-east ec2_key_pair_file: /Users/me/.ssh/me-east.pem ssh_tunnel: true

Then I run this on my local machine: python my_script.py -r emr my_file.txt

It creates a cluster but then cancels with this message:

Cluster j-7DI32SQ1R061 is TERMINATING: The given SSH key name was invalid Step 1 of 1 failed Terminating cluster: j-7DI32SQ1R061

My ssh key was for AWS east-2, so I tried setting this in .mrjob.conf too, but it didn't help:

aws_region: us-east-2

Do I need a different access_key_id and secret_access_key for AWS east-2 or something? Any thoughts on what could be going wrong here?

Reza Mousavi
  • 4,420
  • 5
  • 31
  • 48
TheSneak
  • 500
  • 6
  • 15

1 Answers1

0

First of all, make sure you followed Mrjob SSH key tutorial

As it states, did you run chmod og-rwx /path/to/EMR.pem on ssh key? Also, SSH keys are region-specific, so yes you need to leave the aws_region: us-east-2 and make sure it's created in the same region in your aws console.