How to set up AWS for Part 1 v2

Jeremy did give a session doesn’t AWS at the end of his lecture…

Either the 1st or 2nd…(not sure which one)

It was 2nd lecture.

please @ecdrid and @Vishucyrus correct me if i’m wrong
first step
ssh-keygen -t rsa
after getting those keys i should moved it to my hard drive
using this command
cp .ssh/ /mnt/c/Users/ADMIN/Documents/
then share this key to AWS through import key option .

if this method of mine is correct .could you please tell me how to create a .pem file

In the lecture Jeremy only used ssh-keygen … (without -t rsa)
I don’t know about creating a .pem file… But I guess you want this to use with putty… If so then you don’t need to create .pem file. You can follow these steps…

  1. cp .ssh/id_rsa /mnt/c/Users/ADMIN/Documents/
  2. Open PuTTYgen app and load id_rsa
  3. Click “Save private key” with the name id_rsa.ppk
  4. Use this to connect to your AWS instance with puTTY .

Note - I tried to do this with puTTY but got the same result until I changed my Internet Source.

1 Like

we can create .pem file using aws website itself…

yes in my case i created a id_rsa file which is id_rsa.pem file

actually i don’t want to use putty for the moment .i want to connect it with my local computer.and changing wifi connection didn’t resulted in any change

even i tried with putty ,the black screen come for a while ,then a block appear network error ,connection time out.have you faced this error .if yes how did you resolved it

@naveenmanwani What time zone are you in? I can get on a zoom call and guide you through it. Wed and Thurs I am completely unavailable, perhaps sometime today or on Friday.

1 Like

thank you mam for your kind gesture but just few minutes back i solved my problem ,actually it was because of my router i was facing this problem of port 22 unavailable,i don’t why my router didn’t not allowed me to establish connection from port 22,but as being said quitter never wins and winner never quit .therefore as soon as i switched to my phone internet connection things worked pretty nicely and then i followed your guide to open the jupyter notebook


I tried to launch the AWS fastai EC2 instance, i got the below error message, please advise.

Please find the error message below:

Launch Failed
You have requested more instances (1) than your current instance limit of 0 allows for the specified instance type. Please visit to request an adjustment to this limit.
Hide launch log
Creating security groups

Successful (sg-722c830e)
Authorizing inbound rules

Initiating launches


You need to click on the link in that message and request access to that instance type.

thanks Jeremy

I have already raised a request with amazon support, they have not yet responded, let’s see how soon it gets sorted out

Hi all,

Anyone faced similar problems running the first training model for dogs and cats on AWS in the 2018 version of the course after setting up the instance fine, and running Jupyter Notebook?

These are the steps I took.

  1. I used the setup script and managed to get an instance running on AWS. No problem.

  2. I ssh’ed into the machine and run every line of code in in my AWS instance manually. This looked fine too on the surface.

  3. I started Jupyter Notebook and ran lesson1.ipynb. Worked fine.

  4. This is where the problem arose. I shift-enter’ed all the steps (waiting for each to complete running first before running the next block) until this block:

data = ImageClassifierData.from_paths(PATH, tfms=tfms_from_model(arch, sz))
learn = ConvLearner.pretrained(arch, data, precompute=True), 2)

I ran it and it got stuck after downloading resnet34. I waited for more than 10 mins and nothing happened.

Thereafter, I reloaded Jupyter Notebook and ran each block again until I reached the resnet34 block. I ran it and then it gave a different error.

RuntimeError: cuda runtime error (2) : out of memory at /opt/conda/conda-bld/pytorch_1512387374934/work/torch/lib/THC/generic/

You should restart your kernel since your GPU is out of memory.


Hi! I have written a comprehensive guideline for setting up and running fastai on Amazon AWS. Hope it would be helpful. Please let me know if any modification is necessary.


Great post @Masum !
I just published one that answers the question : how to setup fastai in an Amazon AWS region without fastai AMI like in Europe :slight_smile:

Hello everyone! I am trying to set up AWS for Part 1 v2 as well, but when search for ‘fastai’ in the community AMIs there are no results. Has anyone else had this problem? Or are these instructions already out of date somehow?

I have got the instance P2 XLarge limit increase to “1”, but when I try to use " fastai-part1v2-p2 — ami-x" to launch instance, I got error message as “Your instance configuration is not eligible for the free usage tier”. Why? How to fix it without pay more? Thanks!

Unfortunately there are no GPU versions on the free tiers as of this writing.