Amazon Web Services

From Wikicliki
Jump to: navigation, search

AWS Refresher 2013

  • Using Firefox 20.0 on Mac OS 10.7 - S3 Fox Plugin doesnt work, so i switch browser.

Amazon Web Services 101, Cloud Computing Seminar, 14 June 2012

  • Where data is hosted and processed in the cloud because its faster!

Why use AWS

  • Elastic capacity
  • Quick, easy to deploy
  • No contract, no initial investment required, no capital exchange necessary
  • Pay as you go (pay for the machine ONLY when you use it, you don't need to own the infrastructure - easy to turn resource on and off)
  • Automation

Fun Fact: Dropbox is hosted and run entirely on AWS. Apparently Amazon S3 says their durability is 99.999999999 (11 nines). It says it will only lose one file in a million years.

AWS Infrastructure

  • Organised into multiple regions. Each regions have a multiple data centres. If one building burns down the other one still has the data. The customer does not feel interruptions and its highly redundant.
  • Start your instances at a region closer to yourself.
  • Edge Locations - these automatically help to distribute/serve the data (near Singapore there is Tokyo, Osaka, Hongkong) - a content delivery network

Setting up AWS Account

  • Go to
  • You will need Name, Email, Credit Card (for laters), Phone number
  • It will call you to confirm (and you will recite the number back to it and IT WILL MAGICALLY KNOW)

Web Services

  • Command Line / API / SDK / Web Console
  • Managment Interface > Cross Service Features > AAAAAAAAAAAAHHHH INFORMATION OVERLOAD

Amazon Elastic Compute Cloud (EC2)

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud. It is designed to make web-scale computing easier for developers.

Amazon EC2 presents a true virtual computing environment, allowing you to use web service interfaces to launch instances with a variety of operating systems, load them with your custom application environment, manage your network’s access permissions, and run your image using as many or few systems as you desire.

  • Go to AWS Management Console


  • Create Bucket - this bucket must have a unique name around the entire world


  • Try to Upload a File. Upload a simple image. The clock starts ticking, cost of storage is 12.5 cents per gigabyte (but wait! the first 5 gb is free each year).



  • Go to Cloudfront > Create Distribution (Follow the dropdown menus)
  • Note what your domain is (should be
  • Go back to your bucket under S3. Load it up. Select the bucket and click on actions to see Properties.
  • Go to website > and tick Enabled.
  • At this point the image you uploaded is now online at two places:
    • Bucket domain:
    • Cloudfront:
  • Go back to EC2.
  • Press the Launch Instance button
  • Request Instance
  • Choose an AMI (Amazon Machine Image) - i chose linux
  • Provide instance details.
  • Create a keypair. If you lose the Key pair for an instance, you will never find it from amazon so your machine will not be available anymore ever again.
  • You will receive a .pem (key access file). Save this in a safe place. Or back it up.
  • Configure your Firewall. If you don't have one/don't know what it is, just choose the default security group.

Security Group

  • Security Group - this part a bit over my head. basically you can control access and the firewall within 3 seconds and block IP if you are being hammered by someone.
  • Now it is later. OH I UNDERSTAND NOW. You must set the ICMP and TCP with a new rule to allow all people to see it so that you can ping the IP!!!! Otherwise only a private group can access it...
  • You should be able to ping the IP in terminal

Elastic IP

  • Elastic IP - Create a new Elastic IP Address
  • Generate a new Elastic IP instantly with two button clicks



  • Right click and associate it with something else - your instance for example
  • ping the IP - should work if security group is set correct to allow to ping


  • Open terminal and find the pem file
  • chmod 600 yourkey.pem (change permissions for the pem file so u can run it)
  • ssh -i yourkey.pem ec2-user@<YOUR ELASTIC IP> (connecting...)


start httpd

  • sudo yum update (run some updates/??)
  • sudo yum install httpd (install the web server)
  • sudo apachectl start (start httpd)


Go to your elastic ip and you will see this screen


  • you can login to sftp to see the files, remember to set connection type with private key (yourkey.pem)
  • strangely i cannot add files in (WHY????)
  • SOLUTION: sudo chmod 777 var/www/html/
  • then you can drop in the file to the var/www/html folder!!


ITS ONLINE! Okay i spent the entire workshop doing this up to this point. Where is database how does i shot web now i have no idea?


  • the class steamrollers on...
  • Launch DB instance
  • start mysql engine
  • management options > backup / can roll back if you need
  • DB security group setting to CIDR/IP

Starting to randomly google for help

These links look interesting but what am i doing? Help

See Also