- 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.
- Name: This is the name of the instance that you’re running.
- Instance Type: will show what type of hardware that Instance is using (in the example the instance is using m3.large.
- Instance ID: this is the identification number for this Instance.
- Availability: This shows which region the instance is available for.
- Instance State: Shows if the instance is running or not.
- Status Check: this is used to check the status of the Instance.
- 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.
chmod 400 *private_key.pem*
ssh -i *private_key.pem* firstname.lastname@example.org
Explaining the command
- Cd was used to go to the directory where .pem key file was located.
- Chmod command ensured that permissions of this file were correct.
- 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!
Scenario: I cannot log into my EC2 instance.
- 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.
- Check if you are in the same directory as the .pem file, if not then use the cd command to change directories.
- Each instance has their own key file, make sure you’re using the right one.
- As shown earlier, make sure that you run the chmod 400 command for setting permissions.
- Make sure that you include the .pem file name in your SSH command.
- Make sure to specify what user you want to log in as.
- Specify the correct IP address in the command line.
- 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.
- 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.