Sunday, September 25, 2011

Getting Command Line Access to Amazon EC 2 / Web Service

After signing up for the AWS account, did the following steps to get started with command line access to my instance:
$ sudo apt-get install sun-java6-jdk
  • Added the following to .bashrc for the EC2 environment variables: 
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26
export EC2_HOME=/home/thejus/aws/ec2-api-tools-1.4.4.2
export AWS_RDS_HOME=/home/thejus/aws/RDSCli-1.4.007

export PATH=$JAVA_HOME/bin:$EC2_HOME/bin:$AWS_RDS_HOME/bin:$PATH

export EC2_KEY_DIR=/home/thejus/aws/keys
export EC2_PRIVATE_KEY=${EC2_KEY_DIR}/pk-Y36R3VDKYF55PYKVXR3VFGSNCY7AQGLS.pem
export EC2_CERT=${EC2_KEY_DIR}/cert-Y36R3VDKYF55PYKVXR3VFGSNCY7AQGLS.pem
  • Run this command to verify that the command line tools are set up:
$ ec2-describe-regions 

REGION eu-west-1 ec2.eu-west-1.amazonaws.com
REGION us-east-1 ec2.us-east-1.amazonaws.com
REGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com
REGION us-west-1 ec2.us-west-1.amazonaws.com
REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com

  • Launch the instance from the AWS management console: I selected the ubuntu server instance type instance: i-72fb9e12 (ubuntu-server), mainly to stay within the free tier limit, along with the micro type.
  • Download the key during the instance creation process and save in key directory.
  • Run this command to check the status of the instance once started:
$ ec2-describe-instances
  • Enable ssh connectivity to the instance using this command:
$ ec2-authorize default -p 22 -s 0.0.0.0/0
  • Once the instance is in a running state connect to the instance using ssh: 
$ ssh -i thejus.pem ubuntu@ec2-72-44-48-18.compute-1.amazonaws.com


If you see the ubuntu command prompt on the Amazon instance then you are successfully logged in!

Monday, September 19, 2011

AWS Free Usage Tier

Going to sign up for Amazon Web Services and hopefully stay within the free tier limit to avoid a charge to my CC which Amazon verified during the signup process:

AWS Free Usage Tier (Per Month):
  • 750 hours of Amazon EC2 Linux Micro Instance usage (613 MB of memory and 32-bit and 64-bit platform support) – enough hours to run continuously each month*
  • 750 hours of an Elastic Load Balancer plus 15 GB data processing*
  • 10 GB of Amazon Elastic Block Storage, plus 1 million I/Os, 1 GB of snapshot storage, 10,000 snapshot Get Requests and 1,000 snapshot Put Requests*
  • 5 GB of Amazon S3 standard storage, 20,000 Get Requests, and 2,000 Put Requests*
  • 15 GB of bandwidth out aggregated across all AWS services*
  • 25 Amazon SimpleDB Machine Hours and 1 GB of Storage**
  • 100,000 Requests of Amazon Simple Queue Service**
  • 100,000 Requests, 100,000 HTTP notifications and 1,000 email notifications for Amazon Simple Notification Service**
  • 10 Amazon Cloudwatch metrics, 10 alarms, and 1,000,000 API requests**
In addition to these services, the AWS Management Console is available at no charge to help you build and manage your application on AWS.

I should remember to stop the instances when I am not using them.

Delving into the Cloud

I am creating this blog to blog about my experiences as I delve into the world of cloud computing. My goal is to write about the different options and architectures on the cloud computing front with a practical implementation. Specifically, I will keep a journal of day to day activities of actually implementing a site on cloud, do research on different cloud computing platforms and architectures and review the pros and cons of implementation on a cloud versus hosting ones own infrastructure.

I propose to start with Amazon Cloud since it is one of the most popular cloud computing platforms. After a quick implementation, a sort of a proof of concept, I will look into the security, scalability and reliability aspects of the cloud platform. I also plan on doing a similar installation on other cloud platforms as and when they present themselves.