AWS Educate - EC2 Virtual Machines


Overview


Note: If you are interested in running campus-licensed Windows/Linux/Mac software via a web browser, please request the Cloud Labs service by submitting an Instructional Technology Request (CINFO) and selecting your desired software from page "3. Labs (Cloud/Physical) & Software". For more information, you may open a support ticket by emailing cloudlabs-teaching@ucsd.edu.

ITS/ETS offers students and instructors access to a centralized Amazon Web Services environment for deployment of course-related Virtual Machine instances, disks, etc.

Costs


Amazon charges by the hour for each Virtual Machine, Block Device, and other resources you deploy. These charges are offset by grants provided by Amazon, which average $50 per student per course. We monitor accrued costs to ensure that each person stays approximately within the limits of those grants, and send each instructor a daily summary of the costs charged to their class. Students, instructors, and departments are not responsible for those costs or overages, but resources and accounts may be terminated to control costs.

Virtual machines can cost anywhere from $0.01/hour for limited CPU/RAM, to $0.95/hour for standard 1-GPU hardware. Any resources left running may quickly consume your budget, and in the interests of conserving these limited funds, your instructor, TA, or ITS/ETS may suspend your VM resources if they appear idle or “runaway”. ITS/ETS monitoring scripts also will prevent operation of more than 2 simultaneous virtual machine instances per student login (1 t2.micro, and 1 other), or more than 500GB of storage, without prior instructor approval.

All use of UCSD’s AWS Educate environment is subject to monitoring by ITS/ETS and course TA/Instructors at any time. Please do not use these resources for outside coursework or for personal projects.

Alternatives

Amazon no longer offers student promotional credits for personal use. Instead, consider Microsoft's cloud service Azure, which offers a $100 credit for students to apply towards cloud computing costs. To create an Azure for Students account, visit: https://azure.microsoft.com/en-us/free/students/ 

Click the green "Start free" button and create an account with your ucsd.edu email address. It will use a different UC San Diego sign-in page than usual - use your email address as your username to log in with your regular Active Directory password, and complete the account setup process.

Note: Once you have created your account, you may need to log out and then back in again, as the portal doesn't always recognize your student subscription when you first log in.

Student Login to UCSD AWS Educate Console


Point your browser at https://awsed.ucsd.edu/. You will be presented with a standard UCSD Single Sign-On login page. Enter your UCSD login username (excluding any @ucsd.edu or @eng.ucsd.edu), and your password.

Next, select the course (e.g. CS 253) you plan to work within. Your AWS credit allocation (in dollars), as well as overall usage, will be displayed. Note that activity may take up to 12 hours to be included in your balance.

Screenshot: List of courses displayed in cloud management     Screenshot: Course resource details for AWS

Launch AWS EC2 Console


Most coursework will take place within EC2 (Elastic Compute Cloud) virtual machine instances that you will launch. After clicking on the desired AWS Role (e.g. “cs291wi_wi17_student”), you will be redirected to the AWS Console, where you may choose “EC2” from the “All Services” menu.

Screenshot: EC2 in the AWS Service Options     Screenshot: EC2 Dashboard

Note: All UCSD AWS Educate activity is currently limited to the US-West-2 (Oregon) data center.

Launch EC2 Instance


NOTE: AWS is currently implementing a new UI for the EC2 launch process, which will likely become mandatory over the next few weeks/months. Until the "old experience" is completely removed, we will have documentation/screenshots of both UIs where relevant.

Once in the console, you may launch a virtual machine Instance via the blue “Launch Instance” button.

Step 1: Choose Machine Image (template)

Old UI:

Your instructor may restrict you to a specific Amazon Machine Image template, else you may choose any relevant image from Amazon’s catalog. To view instructor-supplied images, select “My AMIs”:

Screenshot: Machine Image Options

New UI:

You can use "Quick Start" to select common AMI providers (Amazon, Ubuntu, Windows) and then select the specific AMI you would like, or you can search up AMIs in the top bar. Please do not name your instance.

Step 2: Choose Instance Type (CPU/RAM/GPU configuration)

Amazon offers a wide array of hardware types, ranging from trivially small (and cheap), to enormously powerful (and tremendously expensive). Your instructor has selected a subset of instance types for use in this course; choosing others will result in a “permission denied” error.

Old UI:

Screenshot: How to pick your instance type

New UI:

All courses will have access to nano, micro, and small burstable general purpose (t-types such as t2.micro, t3.nano) instance types. We recommend you use a t2.micro (1CPU, 1GB RAM, no GPU, costing $0.012/hour) instance type to become familiar with AWS, launching instances, and logging into the virtual machines.

Other common instance types used by courses include “g2.2xlarge” (standard 1-GPU instance, $0.65/hour), and “p2.xlarge” (advanced 1-GPU instance, $0.95/hour). See Amazon documentation for a full price list. Your instructor/TA will determine which instance types are available for your course.

Step 3: Configure Instance Details

We don’t suggest you modify any of the settings on this screen. Click on “Next: Add Storage”

Step 4: Add Storage

You may increase the storage allocated to your Virtual Machine on this screen. Please check with your instructor or TA before provisioning volumes larger than 200GB.

Step 5: Clear Tags

Our shared AWS Educate environment doesn’t currently permit students to assign tags to their Instances.
You may delete the default “Name” tag to prevent a harmless warning later in the process.

Step 6: Configure Security Group

A “Security Group” is essentially a per-instance firewall configuration.

Old UI:

Please click “Assign Security Group: Select an existing group”, then choose a Security Group from the options listed. (Your instructor may limit to you a subset of the options displayed, and we do not currently permit students to configure custom security groups.)

Note: You must select a security group. Otherwise, the instance will fail to launch.

Click “Review and Launch” to proceed to the final screen.

Screenshot: How to set security group

New UI:

At the end of the page, you'll see "Network settings". Click "Edit" on the top-right, which will allow you to select a Security Group once you click the "Select existing security group" radio button. There is no need to save your option after selecting a Security Group.

Step 7: Review Instance Launch

Please review the options you have chosen, and click “Launch” when you are ready to launch.

Step 8: Generate (or Choose) SSH Key

Old UI:

Screenshot: How to generate SSH Key part 1   Screenshot: How to generate SSH Key part 2

The final step requires you to associate an SSH public key with the instance, to enable you to login to the VM via SSH.

If you have not previously configured a public key, please generate one. Since key names are shared among all UCSD AWS Educate users, please name your key according to your account name (e.g. “jsmith-cs291”).

Once you have generated a key, store the private key .PEM file into your SSH client, and treat it as you would a password.

Some types of group work may require you to share a key with team members; in these instances we recommend you create a new key specifically for that purpose, rather than sharing an existing key you’ve used for individual work.

If you’ve previously generated a key within AWS Educate, you may instead choose its name from the dropdown list.

New UI:

Before the "Network Settings" dropdown, you'll be prompted to select a key pair for login. Either create a new key pair by clicking the button to the right of the dropdown menu, or select a pre-existing one.

Step 9: Launch!

Choose “Launch Instances” to launch your instances. You may see a harmless warning:

Screenshot: Launch warning

Click on the instance identifier ( i-0eb02951330daee3e) to view your instance details in the EC2 Console:

Screenshot: Instance Identifier

Your instance should be tagged as yours (via the “owner” tag) within 5 minutes after launch.
Until that happens, you won’t be able to Stop your instance. (Please note that Amazon charges a minimum of 1 hour for each instance launched.)

Step 10: Connect to your instance via SSH

To connect via SSH, utilize the private key chosen above, and SSH into the “Public DNS” name shown in the EC2 console. Your username may be “ec2-user” or “ubuntu” depending on the AMI image used.

Screenshot: Connecting via SSH

Step 11: Shut down your instances!

Please conserve your AWS Educate allocation by shutting down your EC2 instances when they are idle.

To prevent accidental data loss, you may “Start” and “Stop” instances, but by default may not “Terminate” (destroy) virtual machines. If you need to terminate an instance, you can override this safety feature by creating a tag on your instance named "terminable" and setting it's value equal to "true". Then you will be able to terminate your instance. Otherwise, you may ask your professor to terminate your instance.

Persistent Spot Instances will relaunch until the Spot Request is cancelled. To cancel, please do it from the Spot Instance Console.

With a TA/Instructor role in AWS Ed

  1. Login to awsed.ucsd.edu
  2. Go to class
  3. Click instructor role
  4. Find instance
  5. Terminate

Other Features of Interest


You may create standalone EBS volumes, attach them to instances you have created, and may also detach/destroy them as needed. The 200GB guideline is not currently enforced, but to manage overall resource consumption we suggest you consult with your instructor or TA before exceeding it.

Team/Group support is available: ITS/ETS can shift team members’ budgets into a Team Leader’s account, and can give team members permission to manage resources created by other members.

Planned Features / Known Limitations

Please contact ITS/ETS for assistance with any of the following EC2 operations.

Your instructor or TA will be your best resource for course-specific questions. If you still have questions or need additional assistance, please email awsed@ucsd.edu or visit support.ucsd.edu. When contacting ITS, please be sure to specify that your AWS usage is course-related, and identify the course.