using amazon web services (aws) for...

23
Using Amazon Web Services (AWS) for Labs Atefeh Sohrabizadeh, Eddie Huang

Upload: others

Post on 29-May-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Using Amazon Web Services (AWS) for Labs

Atefeh Sohrabizadeh, Eddie Huang

Page 2: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Acknowledgment

We would like to thank Yuze Chi and Peng Wei for creating these slides.

Page 3: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Outline

• Signup for an AWS Account

• Signup for AWS Educate Credit

•Create an AWS EC2 instance

Page 4: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Outline

• Signup for an AWS Account

• Signup for AWS Educate Credit

•Create an AWS EC2 instance

Page 5: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Create an AWS Account• Or login to it if you have already signed up for it

• Use this link for AWS Account Signup

• Unfortunately, your credit card info is needed, so be very careful against using up your $100 credit and being billed on your credit card!

Signup or Login

Page 6: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Outline

• Signup for an AWS Account

• Signup for AWS Educate Credit

•Create an AWS EC2 instance

Page 7: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

AWS Educate

•$100 in AWS credits per student OR

•An AWS Educate Starter Account with a $100 in AWS credits• Cannot be used for the Amazon EC2 instances we’ll use

•Only students from member universities get the $100 credits, so please signup AWS Educate with your @ucla.edu email

•Access to AWS Technical Essentials Training Course

•Use this link for AWS Educate signup or search “AWS Educate” on Google to find it by yourself

Page 8: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Join AWS Educate

•Or login to it if you have already signed up for it

Signup or Login

Page 9: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Join AWS Educate

Signup as a Student

Page 10: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Join AWS Educate

Use your @ucla.edu email, since students from member universities get much more credits, do NOT use @g.ucla.edu or @cs.ucla.edu or anything else, or you will NOT receive the correct amount of credits

Write the complete name of the university (without comma) to get the full 100$ credit“University of California Los Angeles” IMPORTANT: do NOT enter "UCLA"

Page 11: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Join AWS Educate•Be really careful with this step!

• If selecting an AWS Educate Starter Account, you will only get $100 credits, and NO ACCESS to F1!

It’s not there anymore

You will probably only see this one

Page 12: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Join AWS Educate• An email will be sent to your @ucla.edu address for verification• And then, the application will be reviewed

• And finally, an approval email with the $100 promotion code will be sent to your @ucla.edu email

• Follow the instruction to redeem your credit

Page 13: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Outline

• Signup for an AWS Account

• Signup for an AWS Education Account

•Create an AWS EC2 instance

Page 14: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Create an AWS EC2 instance

•Once your account is active, head over to the AWS console, and click on EC2.

Under “Services”, find and click EC2

Page 15: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Select AMI

• We’ll use different AMIs for different purposes

• For CPU and GPU we use Ubuntu 18.04

• For FPGA we use FPGA Developer AMI or Merlin AMI

Page 16: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Select AMI

Page 17: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Select the Instance• We’ll use different instances

for different purposes

• For CPU we use m5.2xlarge (Use this for now)

• For GPU we use g3s.xlarge

• For FPGA development we use m5.2xlarge

• For FPGA deployment we use f1.2xlarge

Page 18: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Create and keep your key pair

Create a key pair and use it for SSH

Page 19: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Using key pair to log into instance

Type in your linux console:

ssh -i <your_keypair_file.pem> ubuntu@<ip address>

Page 20: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Once you SSH…• Check the price of the instance your are using. keep it

on only when you are working on the labs.•When you need to take a break, make sure you stop

the instance!• You’ll be charged for storage, which is not expensive but not

0• You can start the instance at any time

•When you’re done for the lab, make SURE you terminate the instance!• You’ll not be charged for this instance anymore• Your data will be erased

• For Ubuntu the default username is ‘ubuntu’• FPGA AMI uses CentOS, the default username is

‘centos’.

Page 21: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Accounts

•By now you will have two different accounts• One is your own account• The other is the AWS educate classroom account

• To access this account, log out of your own account first

• Click AWS Console

• You’ll be redirected

• This account is linkedto this class

• Use this account first!

Page 22: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Instance Limitations

•By default you may not be able to launch instances

•Use your educate account to get started• with m5.2xlarge

•Request limit increase for your own account ASAP• Mention that you are registered for CS 133 at UCLA and

we’ll use the following instances (subject to change)• c5.4xlarge for CPU

• g3s.large for GPU

• f1.2xlarge for FPGA testing

Page 23: Using Amazon Web Services (AWS) for Labsvast.cs.ucla.edu/~atefehSZ/teaching/cs133_docs/week1/AWS_Tutorial.pdf · “AWS Educate” on Google to find it by yourself. Join AWS Educate

Use GitHub for CS133

•Register a GitHub account if you haven’t

•Use git and GitHub’s private repos to manage your code• Avoid data loss & ease code migration

•We will provide detailed instructions in lab specs