Amazon AWS Hosted Web Site, start to finish

From Colettapedia
Revision as of 16:34, 1 December 2013 by Colettace (talk | contribs)
Jump to navigation Jump to search

Buy the Domain

Initial EC2 Setup

Create Key Pair for SSHing

  • Not possible to specify password when logging into instance, need public key (btw which only works for the region it was created):
  1. Open up Amazon Web Services Console
  2. Open up EC2 Console
  3. Choose your correct region via navigation bar at the top right
  4. On the left navigation pane under "NETWORK & SECURITY," choose Key Pairs
  5. Click Create Key Pair, choose a name for the key pair, probably including the region for which the key pair was created. A .pem file will automatically be downloaded locally. chmod 400 the file. Need to specify the .pem file when SSHing.

Create Security Group

  • Looks like EC2 is pedantic about who can connect. Need to create a white list of which IPs the instance can talk to. Need to put your IP on the list.
  • checkip.amazonaws.com is pretty simple
  • Command line utility traceroute is helpful in figuring out ISP, also has built in IP utility
  1. Open up EC2 Console
  2. If necessary, choose your correct region via navigation bar at the top right
  3. On the left navigation pane under "NETWORK & SECURITY," choose Security Groups
  4. Click Create Security Group, and fill in the details
  5. Click on the Inbound tab and add Rules for HTTP (source=0.0.0.0), HTTPS (source=0.0.0.0), and SSH (your ip address with your.ip.address.boom/32) (always /32 if its your local machine, apparently)

Launch an instance

  1. Console, launch instance
  2. Top choice should be Amazon Linux AMI, default is 64bit instance (Figure out the difference between EBS and HVM)
  3. Micro instance is free tier eligible, selected by default
  4. Click Review and Launch
  5. Edit security group and select the one your just created, then click Review and Launch
  6. Click Launch, bringing up the Key Pair dialog, and select the one you just created, or create a new pair, or select the option not to specify pair
  7. The instance will show up on the dashboard.

Enable billing alert

  • Will let you know when your 12 months are over and your bill will exceed $0.00
  • New style is in the console navigation under Services->Billing
  • Services->CloudWatch, create alarm when billing rises above $0 (Don't forget to change the >= operator to a >)
  • Use 6 hour period, or it might trip the alarm for insufficient data

Connect To Your Instance