Setup problems: AWS

(Rachel Thomas) #21

@ethan @anaik2 An elastic IP address is allocated each time you run the setup script. You need to release the unused elastic IPs. In addition to having a limit, Amazon charges for unused elastic IP addresses, but doesn’t charge for ones that are being used.
Go to, and read the section on “Releasing an Elastic IP Address”

(janardhanp22) #22

Thanks @rachel my instance is running however and i can start and stop the instance now.

But I don’t see my aws-key in the link:
as well in my local ~/.ssh/aws-key.pem.

Cannot access the web browser link as well.

(Jeremy Howard) #23

@janardhanp22 sounds like you might be best off terminating that instance, removing all your VPCs, elastic IPs, and key pairs (and aws-key.pem in ~/.ssh if you have it) and running it again.

(janardhanp22) #24

Thanks @jeremy I was about to ask the same. Can i redo everything again and will terminating the instance have any repercussions ?

(ethan) #25

Should we release all the Elastic IPs, and then run the “setup” command again?

(anaik2) #26

Thanks @jeremy, I am doing the same too. I accidentally deleted my active (instance) Elastic IP too.

(Jeremy Howard) #27

@ethan yes. and delete all VPCs and key pairs, and ~/.ssh/aws-key.pem

(ethan) #28

For some reason it turned out I had an instance running. I stopped it.
Is that normal?

(janardhanp22) #29

I was able to do nvidia-smi it gave the output required. When I tried to type sudo rm bash_history
ubuntu@ip-10-0-0-4:~$ Write failed: Broken pipe

(ethan) #30

I deleted all the things you listed. Then I did the “setup” command, and it gave me this error:

True line 13: /Users/username/.ssh/aws-key.pem: Permission denied

An error occurred (InvalidKeyPair.NotFound) when calling the RunInstances operation: The key pair ‘aws-key’ does not exist
Waiting for instance start…

Waiter InstanceRunning failed: Waiter encountered a terminal failure state
usage: aws [options] [ …] [parameters]
To see help text, you can run:

aws help
aws help
aws help
aws: error: argument --instance-id: expected one argument
Connect: ssh -i /Users/username/.ssh/aws-key.pem ubuntu@

(~/.ssh/aws-key.pem gave me a Permission Denied)

(anaik2) #31

Thanks guys! After terminating that instance, removing all your VPCs, elastic IPs, and key pairs (and aws-key.pem in ~/.ssh) and runing the again, I was able to ssh successfully.

I am on Windows 7 so also had to install openssh on cygwin as cygwin by default was using the ssh I had on Windows.

(janardhanp22) #32

I terminated 2 instances and tried again to recreate my user, aws configure and
An error occurred (UnauthorizedOperation) when calling the CreateVpc operation: You are not authorized to perform this operation.
usage: aws [options] [ …] [parameters]
To see help text, you can run:

(ethan) #33

How did you delete your aws-key.pem?

(janardhanp22) #34

deleted on EC2 console and also locally using rm ~/.ssh/aws-key.pem

(ethan) #35

It worked! Thanks :smiley:

(anaik2) #36

@ethan I am no expert here but, the things what @jeremy suggested about redoing the setup worked for me. Originally I had problems with the ~/.ssh and @rachel 's suggestion below worked (after deleting the local key file)

cd ~
mkdir .ssh
chmod 700 ~/.ssh
Then try running the setup script again

Just in case this is helpful to you :slight_smile:

(melissa.fabros) #37

My g2.xlarge instance was just approved today. This is not the p2 instance, right?
The study group yesterday was really helpful and helped me with an initial set up on an m4.large instance so I could start reviewing lesson 1.

Can I migrate everything I started on the M4.large instance to the g2.xlarge? Or do I need to do all the installs again. ?

(ethan) #38

Thank you! I was able to get everything working, and am now trying to run Cats & Dogs!!! :smiley:

(Jeremy Howard) #39

Melissa even when they say that g2 is approved, they normally seem to approve p2 as well. So I’d try that first, since g2 is far from ideal for deep learning.

All the awscli stuff you installed on your own machine will still be fine, so you just need to run to create your p2 instance. Then you can copy over anything you want from your m4 instance - or better still, commit it to github then check it out on the p2.

(Kicho) #40

Hi @rachel! Thank you for answering me and @janardhanp22. Yes, I already set up an instance and started it. I sourced and ran all commands that you provided. I got an error message as seen from the screenshot; You have requested more instances (2) than your current instance limit of 1 allows for the specified instance type. Should I increase instance limit?