Guide to setting up an EC2 instance (t2.micro)

02 Jan 2018

things that have happened since the new year (aka yesterday and today) - got my spider up and running (FINALLY T.T), got my script done for resizing and uploading the images to my AWS S3, and now, here I am building my EC2 instance!

Keeping a record of this because it is fairly painful (spider ranked at 10, resizing images about a 3, this is like, 7… for now).

Here we go!


Pick an AMI - I have no clue so for now I’m going with the one that my udemy online course is using. Not a GPU cause I’m basically just going to use this to upload the images to S3.

After I SSH-ed in, I tried to do a pip3 install - failed.

Error message: The program ‘pip3’ is currently not installed. You can install it by typing: sudo apt install python3-pip

Ok, so I do the sudo apt install right… fail.

Error message: E: Unable to locate package python-pip

Finally after some googling, this worked:

sudo apt-get install software-properties-common
sudo apt-add-repository universe
sudo apt-get update
sudo apt-get install python-pip

And then, sudo apt-get install python3-pip

Another error pops up:

Error message: locale.Error: unsupported locale setting

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"

A suggestion comes up: You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the ‘pip install –upgrade pip’ command.

And the suggestion doesn’t work, so after googling, here goes:

Use this sudo -H python3 -m pip install --upgrade pip

AFTER that… (i had alot of errors, i know) - for all the pip3 installs, i had to add sudo in front (to indicate super user) like so sudo pip3 install pillow

No clue about that…


because I was accessing AWS i had to download awscli again, set up my credentials etc etc…

but finally…I GOT IT MOVING MUAHAHAH


80,000 images, here i come ;)