Sunday, December 8, 2024

Setting up Amazon Web Services

This tutorial will help you register and get ready to use Amazon Web Service (AWS). AWS provides a free tier so it is possible to use these services at ZERO cost.

These instructions are used by the Effective MySQL: Backup and Recovery book examples.

Step 1: Registration

  1. Goto AWS site
  2. Register email address
  3. Enter Login Credentials
  4. Enter Contact Information
  5. Enter Credit Card details (while this is required, provided you follow free guidelines you will not be charged)
  6. Identity verification by Telephone
  7. Activation of account

Screenshots






Step 2: Signin

Following the confirmation email that your AWS account has been activated you can signin for accounts details. While waiting you can perform Step 3 below.

  1. Confirm access to services
  2. Obtain Security Credentials
    1. Access Key ID
    2. Secret Access Key
    3. X.509 Certificate (both cert and pk files)
    4. AWS Account ID
    5. Canonical User ID






  3. Step 3: Install EC2 API tools

    These tools provide a CLI access to AWS EC2 functionality. It is also possible to use the web-based GUI AWS Management Console.

    $ mkdir -p $HOME/aws
    $ cd $HOME/aws
    $ curl --silent -o ec2-api-tools.zip http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip
    $ [ ! `type -p unzip` ] && sudo apt-get install -y unzip
    $ unzip -q ec2-api-tools.zip
    $ mkdir -p archive
    $ mv ec2-api-tools.zip archive/
    $ ln -s ec2-api-tools-* ec2
    $ ls -l
    $ export EC2_HOME=$HOME/aws/ec2
    $ export PATH=$EC2_HOME/bin:$PATH
    $ [ ! `type -p java` ] && sudo apt-get update && sudo apt-get install -y openjdk-6-jre-headless
    $ java -version
    # For Ubuntu
    $ export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
    # For Mac OSX Use
    # export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
    $ ec2ver
    

    You should see something similar to the following.

    1.5.2.5 2012-03-01
    

    See http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/ for more information on the CLI tools.

    Conclusion

    You are now ready to start using Amazon Web Services.