Description
Lab # 1 Lab Title Creating Amazon EC2 Server using UCB AMI
Related Module(s) 1 Goa
l Understanding AWS / AMI concepts
Last Updated 1/7/16 Expected duration 40-60 minutes
Introduction:
In this introductory lab we will familiarize ourselves with the environment that we will use for the upcoming labs and exercises in this course. In this lab, we will learn about the following:
● Amazon EC2 environment and how to create your AWS Account
● What EBS is and how to make sure your work is persistent
● What S3 is
● What an AMI is
● How to choose a server
● How to find an AMI and launch a server
We will mainly use the AWS documentations. In the below table you can find links to useful and necessary resources discussed in this lab.
Resource What
http://aws.amazon.com/documentation/
AWS Documentations
https://aws.amazon.com/pricing/services/
http://aws.amazon.com/documentation/account-billing/ AWS Pricing and cost management
http://docs.aws.amazon.com/awsconsolehelpdocs/latest/ gsg/getting-started.html
AWS management console
http://aws.amazon.com/documentation/ec2/
Amazon Elastic Compute Cloud (Amazon EC2)
https://aws.amazon.com/ec2/instance-types/
EC2 instance types
http://aws.amazon.com/documentation/s3/
Amazon Simple Storage Service (Amazon S3)
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ AmazonEBS.html
Amazon Elastic Block Store (Amazon EBS)
http://docs.aws.amazon.com/general/latest/gr/awssecurity-credentials.html
AWS Security Credentials
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ AMIs.html
Amazon Machine Images
Step-1. Getting Started with AWS and create your account
Amazon Web Services, is a collection of remote computing services, also called web services, that make up a cloud-computing platform offered by Amazon.com. Here is a short video on what AWS is.
• Introduction to Amazon AWS services
Step-2. Creating an Amazon Web Services Account
Note: If you already have an AWS account, skip this part.
When you create an account, AWS automatically signs up the account for all services. You are charged only for the services you use.
To create an AWS account
1. Go to http://aws.amazon.com, and click Create an AWS Account.
2. Follow the on-screen instructions to create your accounts.
Here is a quick video tutorial that walks you through the who process
Creating an Amazon Web Services Account
Step-3. Applying for AWS credit through AWS Educate:
AWS Educate is Amazon’s global initiative to provide students with the resources needed to greatly accelerate AWS learning endeavors. AWS Educate provides $100 AWS credits for students. To apply for this credit, go to https://aws.amazon.com/education/awseducate/apply/, click on Apply for AWS Educate for Students, and follow the on-screen instructions.
Note: You need to use your Berkeley.edu account in your application to be eligible for the $100 credit.
Amazon charges you based on each service that you use. Note that Amazon credits are used whenever you use a service. You can always keep an eye on the balance of your account in the Amazon Management Console. To learn more about the pricing check the resources guide for AWS pricing and watch Introduction to AWS Pricing video.
Step-4. Understanding AWS services:
While AWS provides many services, we will be working with few services in this course. To manage AWS services, you need to use AWS Management Console. To learn more about AWS Management Console, click here.
In this section, you will learn more about the services that we use in this course. To learn more about each services, click on the appropriate link to watch a short video.
1. Amazon Elastic Compute Cloud (Amazon EC2)
Amazon Elastic Compute Cloud (EC2) allows users to rent virtual computers on which to run their own computer applications. Amazon provides various types of EC2 instances according to your particular needs. You can get familiar with various types of servers that Amazon EC2 provides here.
An Amazon Machine Image (AMI) is a special type of virtual appliance that is used to instantiate a virtual machine within EC2. It serves as the basic unit of deployment for services delivered using EC2.
2. Amazon Simple Storage Service (Amazon S3)
The Amazon S3 is a scalable and low-cost Web-based service designed for online backup and archiving of data and application programs.
Amazon Elastic Block Store (Amazon EBS)Amazon EBS provides persistent block level storage volumes for use with Amazon EC2 instances in the AWS Cloud.
3. AWS Identity and Access Management (Amazon IAM)
AWS Identity and Access Management (IAM) is a web service that enables Amazon Web Services (AWS) customers to manage users and user permissions in AWS.
Step-5. Launching the UCB AMI
Note: it costs to run AMIs; If you are not using your image, shut it down. Also, remember to save your code in github or outside the EC2 instance unless you set the instance to use a persistent storage such as EBS to avoid losses.
Before you can launch an EC2 instance, you should select an AMI to use. To select an AMI, you need to consider the following requirements for the instances that you’ll launch:
• The region in which the instance is launched
• The operating system of your instance
• The architecture of your instance (either 32-bit (i386) or 64-bit (x86_64))
• The root device type of your instance (either Amazon EBS or instance store). More information on the root device types and the difference between EBS and instance store can be found here.
In this course, we are using a custom AMI that comes preloaded with the tools that we use through out the semester.
UCB AMI information:
AMI ID: ami-be0d5fd4
Region: US East (N. Virginia)
Operating System: Linux
Architecture: 64-bit
Root device type: EBS
Launch Permission: Public
How to Chose a Type of Server
There are various instance types optimized to fit different use cases. Instance types give the flexibility to choose the right instance based on your needs by choosing the CPU, memory, storage, and networking capacity of your instance.
During the course of semester, you will need to choose the right instance sizes to run frameworks such as Hadoop and several software packages in future labs and exercises. More information on various instances types and all the instance sizes in a given type can be found here. Choosing the right instance allows you to scale your resources to the requirements of your target workload.
There are various ways for optimizing the costs associated with launching EC2 instances. More information on this can be found here and here.
The following video tutorial walks you through the steps required to find the UCB AMI and launch an EC2 instance based on the UCB AMI.
Note: You need to login to the AWS management console (http://aws.amazon.com/) using your AWS account.
Launching an EC2 instance using the UCB AMI
Submissions:
1-Provide a screenshot of the running UCB AMI that shows you have successfully launched an EC2 instance using the UCB AMI.
2- Provide the answers to the following questions in a file called Lab1-answers.txt
Q1: What is the difference between EBS and S3?
Q2: When would you consider a cloud infrastructure for your data science tasks? Q3: What is the difference between spot instances and reserved instances?
Q4: List the names of four software packages installed on the UCB AMI



Reviews
There are no reviews yet.