Setup problems: AWS

@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 http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html, and read the section on “Releasing an Elastic IP Address”

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: https://us-west-2.console.aws.amazon.com/ec2/v2/home?region=us-west-2#KeyPairs:sort=keyName
as well in my local ~/.ssh/aws-key.pem.

Cannot access the web browser link as well.

@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.

1 Like

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

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

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

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

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

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

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

bash setup_p2.sh
rtbassoc-2ffc1f49
True
setup_p2.sh: 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
securityGroupId=sg-5afe9723
subnetId=subnet-cf4959ab
instanceId=
instanceUrl=
Connect: ssh -i /Users/username/.ssh/aws-key.pem ubuntu@

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

Thanks guys! After terminating that instance, removing all your VPCs, elastic IPs, and key pairs (and aws-key.pem in ~/.ssh) and runing the setup_p2.sh 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.

1 Like

I terminated 2 instances and tried again to recreate my user, aws configure and
bash setup_p2.sh
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:

How did you delete your aws-key.pem?

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

It worked! Thanks :smiley:

@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:

2 Likes

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. ?

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

1 Like

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 setup_p2.sh 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.

1 Like

Hi @rachel! Thank you for answering me and @janardhanp22. Yes, I already set up an instance and started it. I sourced aws-alias.sh 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?