AWS beginner notes

Here are some notes that I have on very basic how to get AWS running. This assumes that you have already signed up for an AWS account.

This is a quick step by step tutorial to show you how to choose an instance type, launch it, ssh into it and start running programs on the instance.

  • First create an amazon account and loginto your management console.
  • Select EC2
    • I usually just use EC2 for getting a linux node up and running.
  • Select a operating system
    • Amazon image is fine
  • Select a instance type
    • i2.xlarge
  • Now you just need to review and launch, and launch. This instance will launch. Once it is launched, you can see the status of the instance from the tab.
    • Use the “Instance” tab on the left to check the statuses of the launched instances.
  • Connect to your instance
    • Right click on the instance, on “connect”, and an instruction will show up on how to ssh into the node
    • ssh -i "*.pem"
    • Note, “ec2-user” is literally “ec2-user”, not your username. In fact, I could not really find the username for my Amazon account.
  • To get the .pem file, you just need a key, val pair
    • Go to the “Key Pairs” tab on the left.
    • Either you create a new key val pair
    • Or you have an existing one stored somewhere. In that case, you have to find it in your local computer. If you can’t find it, just create a new one.
  • SSh into your node
    • Once you have your .pem file and the public DNS (ec2-xxx-x…), you should now be able to log into a remote aws instance.
  • How to pause your instance
    • If you want to stop working on your instance, but you want to keep the state of the machine. The best way is to pause the instance. This way it will cost you very little money (just the storage) and you can turn it back on any time to keep working on it.
      • Actions
        • InstanceState
          • Stop
  • To get a minimum executable up and running (for experiment on the specific instance)
    • You can compile the code in a machine that uses the same instructions. For me, the tricky thing is if I compile it with avx2, but the AWS machien doesn not have it, then it is problematic.
    • Once you copied some executable there, it is likely it will tell you that you are missing certain dynamic libraries, for example
      • error while loading shared libraries: cannot open shared object file: No such file or directory
    • Acquire the library and set up the LD_LIBRARY_PATH
      • find the library file, copy it to a directory, for example current directory
      • export LD_LIBRARY_PATH = .


This entry was posted in Tools, Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s