Launching your First Instance with AWS

Launching and Understanding your First Instance with AWS

  • LG Network’s research.

This article is a part of series of informative reads published by LG Networks on AWS and its Resources. If you have just landed on this page we’d recommend reading the previous material first before continuing.

This article assumes that the user has created an EC2 console if you need guidance in creating an EC2 console please read the previous article.

Examining a Newly Setup EC2 Console:

Once the launching sequence is complete, users should be able to see a console with various options on their screen.

The table view is designed to show all of your instances in that specific region, if you have more than one regions, you may want to switch regions from the tab above. We understand that AWS sometimes uses complex jargons which can be confusing for newer users, we will explain them briefly below.

  1. Name: This is the name of the instance that you’re running.
  2. Instance Type: will show what type of hardware that Instance is using (in the example the instance is using m3.large.
  3. Instance ID: this is the identification number for this Instance.
  4. Availability: This shows which region the instance is available for.
  5. Instance State: Shows if the instance is running or not.
  6. Status Check: this is used to check the status of the Instance.
  7. Public DNS and Public IP: these fields show what’s the DNS and the IP of that particular instance.

There are various other monitoring and configuration options available in this console. An example is that you can modify an instance in the EC2 console by selecting that instance and using the blue checkboxes, clicking on actions will give you a number of options to perform.

To log on to your instance you’re going to need a Unix system. For windows users Putty works fine too, Mac users can use Mac terminal for logging in.

cd ~/*directory_name*

chmod 400 *private_key.pem*

ssh -i *private_key.pem* ubuntu@52.5.92.87

Explaining the command

  1. Cd was used to go to the directory where .pem key file was located.
  2. Chmod command ensured that permissions of this file were correct.
  3. Ssh was used to log into the instance.

Values in *–* denote user-specific values. Please remove the * before entering the command into the terminal.

With this, you should be able to log into your new instance, congratulations!

FAQs

Scenario: I cannot log into my EC2 instance.

Start by:

  1. Check the instance state, is it running? If you recently restarted it or booted it up, it may take a while (few minutes) to come online.
  2. Check if you are in the same directory as the .pem file, if not then use the cd command to change directories.
  3. Each instance has their own key file, make sure you’re using the right one.
  4. As shown earlier, make sure that you run the chmod 400 command for setting permissions.
  5. Make sure that you include the .pem file name in your SSH command.
  6. Make sure to specify what user you want to log in as.
  7. Specify the correct IP address in the command line.
  8. Make sure that the security group that you assigned to the instance uses the same kind of protocol as you defined in the command. If you’re using SSH, then it should be open to access from anywhere and on port 22.
  9. If you made some changes to the instance configuration after reading this, reboot the instance from the console to let them come in effect.

EC2 console in AWS gives options to change instance states as per your requirements. (explaining Start, Stop, Reboot and Terminate)

  • Start: this will boot the system thus starting the instance.
  • Stop: this command will power down the instance.
  • Reboot: this command will reboot the instance.
  • Terminate: this command will terminate the instance. Data in instance storage type storage volumes will be lost. Data in EBS may survive depending on your configuration.

We hope this covers basics on how instances work in AWS EC2. For more information and guidance feel free to contact us.

LG Networks has been maintaining, building, servicing and updating servers since the last 10 years, we’ve got full expertise for handling any situation. Feel free to contact us for any AWS Cloud related issue and we’ll be more than happy to assist you.

Free Savings Assessment
Find out just how much you could be saving!
We respect your privacy.