Setup problems: AWS


Hey Vladi,

I’m happy to help to the best of my limited abilities.

I’m not sure what is your current obstacle. Did my comment about requesting access to P2 instances from Amazon make sense? Jeremy mentions it in the first minute of the setup video:

All I did was to read the text in the last image you posted.

Sorry if I misunderstood your issue. In that case, please restate.

(Sandip) #688

@ Vladi: I am trying to resolve this step as well and from what I have figured out based on comments in this forum is that the wget command is not copying the right stuff. In Jeremy’s video after the cat (7:52 min) shows what the file should look like, however in my terminal it is an html file for google login or something like that, similar to what you are getting as you posted above . There is a suggestion to use dos2unix to create a clean version of the setup file but I don’t know how to do that yet. I am running Ubuntu on a chromebook.


Hey tomtran,

I’m not sure why you are getting this error. But here is how I’d go about troubleshooting.

Googling for the last error message yields these tips from AWS:

Are any of those useful?



the utility dos2unix is usually used to adapt the end-of-line (EOL) style difference between Unix and Windows. I highly doubt it’s an issue here. The utility sure won’t strip out HTML markup.

Silly question, are you logged into Github before issuing the wget command?

Finally, if I’m still off the mark, please provide the exact commands you are using with the exact, full error messages you are getting.


(Sandip) #691

jp_beaudry, I am not logged into github while copying the file location :slight_smile: will try it now

(Sandip) #692


so logging into github didn’t help.
the wget command saved the html code to file and cat on this file shows, I think, 7 iterations of that google login html code.
Is there a way to delete these 7 versions of the file before trying wget again?

(Sandip) #693


instead of


copied the shell script instead of the html code.

This was mentioned earlier, on May31 by z0k

The only other hiccup was, had to install ssh using sudo apt-get install openssh-server

I was able to get to the jupyter notebook and import theano and keras


  • followed Jeremy’s video exactly
  • I had to install gnome terminal instead of the default xTerm to use copy/paste functionality
  • Use the raw file location


Congratulations on getting it working! I think I never ran into that problem because I cloned the whole fastai git repository instead of wgetting just one file.

I think this goes without saying but you can delete the needless* files.

(Tim) #695


I can’t get past the “bash part”. So any assistance would be gratefully received. I’m using Cygwin on Win7. I did it successfully once but had mistakenly put in the wrong region. So I went to through the steps again and keep getting the errors below when trying to run bash

./ line 5: $’\r’: command not found
./ line 8: $’\r’: command not found
./ line 128: syntax error: unexpected end of file

I’ve tried running dos2unix without success. I’ve tried doing some of the steps in different orders etc. Below is except from Console:

Tim@TimHP-PC ~/courses/setup
$ bash line 4: $’\r’: command not found line 9: syntax error near unexpected token elif' ' line 9:elif [ $region = “eu-west-1” ]; then

Tim@TimHP-PC ~/courses/setup
$ dos2unix
dos2unix: converting file to Unix format…

Tim@TimHP-PC ~/courses/setup
$ bash
Only us-west-2 (Oregon), eu-west-1 (Ireland), and us-east-1 (Virginia) are currently supported

Tim@TimHP-PC ~/courses/setup
$ aws configure
AWS Access Key ID [****************JSSQ]: "Password Removed"
AWS Secret Access Key [****************Q4LK]: "Password Removed"
Default region name [us-east-2]: us-west-2
Default output format [text]: text

Tim@TimHP-PC ~/courses/setup
$ bash
./ line 5: $’\r’: command not found
./ line 8: $’\r’: command not found
./ line 128: syntax error: unexpected end of file

Tim@TimHP-PC ~/courses/setup
$ dos2unix
dos2unix: converting file to Unix format…

Tim@TimHP-PC ~/courses/setup
$ bash
./ line 5: $’\r’: command not found
./ line 8: $’\r’: command not found
./ line 128: syntax error: unexpected end of file


Hey Tim,

I think you are very close.

run dos2unix on

As you correctly guessed, complaints of ‘\r’ and end-of-file (EOF) are signs of file format mismatch between Unix and Windows. So you correctly ran the dos2unix utility on

But note how later on the error message is generated by the ‘’ script. You need to run the conversion utility on it, and any other script called.

Hope this helps,


When I head over to to get the script to run, I get an error message of ACCESS DENIED. Anybody else had this problem?

I believe I found the script in github, mentioned by Rachel in another post, at this link:

However, after installing that using
curl in my terminal I ran cat and am getting a response of: No such file or directory

Any ideas on resolving these issues?


Alright, this was simple.

Had to install Homebrew, and then install wget after that. (curl was the wrong command, I just got a HTML source code response when I ran that)

After doing these 2 things I ran:
and WA-LAH!

CATCH IS: Now I’m running into this issue:

bash line 7: syntax error near unexpected token newline' line 7:



I’ve followed your instructions, and now I’m running into this error when running

bash line 20: ./ No such file or directory

any ideas what the issue could be?

(Sandip) #700

Hi mchineLRN,
here’s how I would start troubleshooting:

  1. Line 20 is the last line of the script; there are recommendations in this forum that the last line/end syntax may have invisible errors; dos2unix has been suggested as a fix. Cloning the entire github course repository is another. Search this forum for past Line 20 errors
  2. read the output you get with the cat command and see if that is all correct
  3. re-do the aws configure with the ID and Key



I ran this from above:


and it all worked out. I got this from the post by @macro2data up above from 3days ago

(Sandip) #702

Great! I am at lesson 1 now and there are a few other setup things to test and getting used to.


have you made it through lesson 1 yet? I’m having issues with setup:

(Sandip) #704

I am still reviewing the video to get a hang of it…
Seems like the future module has something to do with python 3 vs the recommended python 2?

I will get to it soon…


Do you have one or two underscore characters on each side of the “future” string? I think it takes 2:

If that’s not the issue, what version of Python are you using?


This is my first query which I decided to post here after a lot of searching through this forum and in the internet. I am running Windows 7, Anaconda 2.7 and have installed Cygwin. I was able to configure aws instance and received the instanceID which I saved to my location. When I try to connect using the statement
ssh -i/home/sswaroop/.ssh/aws-key.pem
I get the following :
usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-E log_file] [-e escape_char]
[-F configfile] [-I pkcs11] [-i identity_file]
[-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec]
[-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address]
[-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]]
[user@]hostname [command]

Any suggestions?