Cloud Computing Amazon Web Services Dongwon Lee Ph
Cloud Computing: Amazon Web Services Dongwon Lee, Ph. D. IST 516 Fall 2011
TOC l l Amazon EC 2 Amazon S 3 IST 516 2
Popular CC Services l Amazon Web Services (AWS): Iaa. S l Google App Engine (GAE): Paa. S l Microsoft Azure Services Platform: Paa. S IST 516 3
Elastic Compute Cloud (EC 2) l l EC 2 is a Amazon’e web service that provides re-sizeable computing capacity—literally, server instances in Amazon's data centers— that users use to build and host their software systems Users can get access to the infrastructure resources that EC 2 provides by using APIs, or web tools and utilities IST 516 4
Amazon Machine Image (AMI) l l AMI: a template that contains a software configuration (e. g. , operating system, application server, and applications) From an AMI, users launch instances, which are running copies of the AMI IST 516 5
Amazon Machine Image (AMI) l Instance Type: A particular hardware archetype based on the amount of memory, computing power, etc. IST 516 6
3 Interfaces to Use EC 2 l Command Line Tools (API Tools) l l l Programmatic Interfaces l l Java based command line client that wraps EC 2 SOAP APIs Ie, SOAP-style web service program Software development kit for Java/PHP/. NET AWS Management Console l l Web based GUI We will use this one today Ie, This itself is a SOAP-style web service program IST 516 7
EC 2 Demo IST 516 8
EC 2 Demo You need to create an account first IST 516 9
EC 2 Demo IST 516 10
EC 2 Demo IST 516 11
EC 2 Demo IST 516 12
EC 2 Demo IST 516 13
EC 2 Demo IST 516 14
EC 2 Demo Save the private key file to your local file system IST 516 15
EC 2 Demo Choose HTTP, SSH, and DNS from the “Select” pull-down menu “Add Rule” IST 516 16
EC 2 Demo Now, I have a virtual server Running on Amazon’s Cloud Computing environment IST 516 17
Accessing the Instance in AWS l Let’s access the instance using any one of the following methods (depending on your platform): 1. Windows: requires Pu. TTY & Pu. TTYgen Download the binary “putty. exe” and “puttygen. exe” into local disk from: http: //www. chiark. greenend. org. uk/~sgtatham/putty/do wnload. html Note that this is simple download, not an installation 2. 3. Unix: use “terminal” program Mac: use “i. Term” program IST 516 18
1. Windows w. Pu. TTY l Convert the private key file EC 2 generated (e. g. , awskey. pem) into l Pu. TTYcompatible format first Run Pu. TTYgen Load select aws-key. pem IST 516 19
1. Windows w. Pu. TTY l l Pu. TTYgen will show info about the key loaded Save private key type new file name (e. g. , aws-key. ppk) Yes IST 516 20
1. Windows w. Pu. TTY l l Run Pu. TTY Connection SSH Auth Browse: select the Pu. TTYgen generated file (e. g. , awskey. ppk ) IST 516 21
1. Windows w. Pu. TTY l Session enter the public DNS of the instance you generated (e. g. , ec 2 -184 -72 -76228. compute 1. amazonaws. com) and Open IST 516 22
1. Windows w. Pu. TTY l l Type “ec 2 -user” when prompted “login as: ” Then, you should see message below, inside of the instance you created IST 516 23
2. Mac/Unix w. Terminal+SSH l Let’s access the instance l Make the downloaded private key file safe chmod 400 private-key-file l Access via SSH channel using “ec 2 -user” account ssh –i private-key-file ec 2 -user@public-DNS IST 516 24
Inside of AMI Instance l Whether you used Windows+Pu. TTY or Mac/Unix+Terminal, at this point, you are able to access AMI instance Windows + Pu. TTY Mac + i. Term IST 516 25
System Admin Commands l For sys-admin task, prefix your command with “sudo” IST 516 26
Tool: Yum l Install s/w that you want to install in your AMI instance using Linux package manager l l yum: http: //yum. baseurl. org/ Eg, sudo yum install package-name IST 516 27
Start Apache Server l Configure and start Apache web server IST 516 28
Tool: wget l l l Build your own home page at /var/www/html Download files over http protocol wget: http: //www. gnu. org/software/wget/ l Eg, sudo wget URL IST 516 29
Eg, Google AJAX Example in AWS IST 516 30
Tool: scp l l l Upload your app to AMI using scp: http: //en. wikipedia. org/wiki/Secure_copy Eg, scp –i private-key-file source-file ec 2 -user@public. DNS: /path/target-file My local Linux machine My Amazon AMI Instance IST 516 31
Simple Storage Service: S 3 l l l One can use S 3 to store and retrieve any amount of data at any time, from anywhere on the web S 3 stores data as objects within buckets An object is comprised of a file and optionally any metadata that describes that file Buckets are the containers for objects For each bucket, users can control access to the bucket (who can create, delete, and list objects in the bucket), view access logs for the bucket and its objects, and choose the geographical region where Amazon S 3 will store the bucket and its contents IST 516 32
S 3 Common Usage Scenario l l Backup and Storage—Provide data backup and storage services for others Application Hosting—Provide services that deploy, install, and manage web applications Media Hosting—Build a redundant, scalable, and highly available infrastructure that hosts video, photo, or music uploads and downloads Software Delivery—Host your software applications that customers can download IST 516 33
S 3 Demo IST 516 34
S 3 Demo IST 516 35
S 3 Demo IST 516 36
S 3 Demo IST 516 37
S 3 Demo IST 516 38
S 3 Demo IST 516 39
Tool for S 3 l S 3 Fox Organizer l l l Extension for Firefox web browser http: //www. s 3 fox. net/ Once installed l Invoke S 3 Organizer IST 516 40
S 3 Fox Organizer Demo IST 516 41
S 3 Fox Organizer Demo Local Contents IST 516 S 3 Contents 42
References l Amazon EC 2 User Guide l l http: //docs. amazonwebservices. com/AWSEC 2/lat est/User. Guide/ Amazon S 3 User Guide l http: //docs. amazonwebservices. com/Amazon. S 3/l atest/gsg/ IST 516 43
- Slides: 43