After signing up for the AWS account, did the following steps to get started with command line access to my instance:
- Download AWS API: Amazon EC2 API Tools
- Download the RDS Command Line Toolkit: Amazon RDS Command Line Toolkit
- From the AWS account management page Get the security credentials to access using API. I downloaded the x509 certificate and private key. http://aws.amazon.com/account
- Since I am running Ubuntu locally (Ubuntu 11.04 - the Natty Narwhal ), I installed the Sun JDK 6 package:
- Added the following to .bashrc for the EC2 environment variables:
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:
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:
- Enable ssh connectivity to the instance using this command:
- Once the instance is in a running state connect to the instance using ssh:
If you see the ubuntu command prompt on the Amazon instance then you are successfully logged in!
No comments:
Post a Comment