Introduction and Aim
The purpose of this lab is to gain basic knowledge and experience of Amazon EC2. QwikLabs describes Amazon EC2 as a ‘web service that provides resizable compute capacity in the cloud’. EC2 is designed for developers who want complete control over their compute capacity and resources, with a need or desire to re-scale the capacity as conditions change.
- Log in to the AWS Management Console
- Create an Amazon Linux Instance from an Amazon Machine Image (AMI)
- Find your instance in the Amazon Management Console
- Log into your instance
Create an Amazon Linux instance from an Amazon Machine Image (AMI)
The Linux instance that I will be using will be General purpose-t2.micro. The lab script suggests the General purpose-t2.small, but is not the one I have decided to pick because the t2.micro is on the free tier, whereas the t2.small is not. I consider this to be a justifiable change as my understanding of this part of the lab is that it is focused on learning how to create an instance from an AMI. As AWS charges differ with relation to the size of the instance, I’m choosing to attempt this lab with the instance size available on the free tier.
The next step is to Configure Instance Details. The lab asks to keep all of the options as default but makes note that this is where I could adjust settings such as the network settings, monitoring, and access settings.
Following the Configure Instance Details, is Add Storage where nothing is adjusted for this lab, then Add Tags. Tags are useful when there are many instances that will be launched, as tagging the instances makes them easier to identify.
The final step before launching the instance is Configure Security Group. The default security group is kept, and it allows port 22 to this instance. At this point in time Amazon brings up a security warning as the source is set to 0.0.0.0/0 which allows all IP addresses, and that is a potential security risk.
While launching the instance, Amazon Management Console organizes Key pairs. These are a set of public and private keys that are used to access the instance. As I already have a key pair that was made during the QwikLab VPC lab (Link Here), I can choose that rather than create another one.
That is everything that is required for the launching of the instance.
Windows User: Connecting to your Amazon EC2 instance via SSH
In order to run the instance, I need the program PuTTY, which is a secure shell client, and the public DNS corresponding to my instance.
The public DNS is copied into the Host Name of the PuTTY program as an extension to ‘ec2-user@’.
Then in the SSH Connection category, the private key is used for authentication. The previous time when I used PuTTY to run an instance, I created a PassPhrase, which is an extra layer of security available when starting an instance.
Once the passphrase is inserted, I am granted access to theEC2 instance.
On the Linux command line, I can type out basic bash prompts and receive a response from the instance. As I’m not familiar with bash, I searched online for some basic commands. The website I accessed is at the bottom of this blog.
An interesting observation here, is that this instance is connected to a different timezone than NZDT.
Amazon EC2 has been interesting to work with as I’m not used to creating elastic compute clouds. The next step in instance configuration for myself, outside of a QwikLab task, would be to experiment with the Configure Instance Details setting and gain further knowledge and experience of how to personalize the configuration. Although I am not familiar with bash for the Linux command line, it would be interesting to learn more in order to gain a greater understanding of the use of the Linux instance in both a personal and professional environment.
SS64, (N.D), An A-Z Index of the Bash command line for Linux, Retrieved from: https://ss64.com/bash/