Search This Blog

Saturday 6 June 2020

AWS EC2 - setting up an instance

Everything that can be written about EC2 has already been written. I however like to make my own short notes and will use this entry as my personal notebook on EC2.
The definition for EC2 from aws docs:
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides 
resizable compute capacity in the cloud
OK, why should I use a Cloud offering ?

1. EC2 comes with a web service interface to obtain and configure EC2
capacity with minimal friction.
2. EC2 allows users tp obtain and boot new server instances to minutes,
this means users can quickly scale capacity, both up and down, as 
computing requirements change.
3. This means with EC2 you only pay for what you use.
Lets start by setting up an EC2 instance.
To create an EC2 instance, we need to select the AMI or Amazon Machine Image
An AMI is a template that contains the software configuration (operating system,
application server, and applications) required to launch your instance.
The AMI page list AMIs from Amazon Linux,  SUSE Linux, Red Hat Linux, Windows Server etc. I decided to setup one with a Windows Server and later one with Amazon Linux.

The next step was to choose the instance type - or the hardware configurations
Instance types comprise varying combinations of CPU, memory, storage, and 
networking capacity.
Each instance type includes one or more instance sizes, allowing you to 
scale your resources to the requirements of your target workload.
Amazon Docs indicate the variety of instance types - General Purpose, Compute Optimized, Memory Optimized etc. Each of these instance types include varied instance sizes.
We can either launch from this step - the Ec2 host will be created with default configurations or we can do further configurations. Here I am opening up the detailed configurations screen for a look at the options:
These are the default selections. The new EC2 host will be created in a VPC by default (more on VPCs later). The EC2 host will stop when shutdown is executed.
Next is storage selection.
The default storage is 30 GB of EBS SSD. The storage is released when the host is terminated. The next is Add Tags, which I skipped past for now. The last step is configuring security groups
However to create the EC2 instance, there is one more step - We need an EC2 Key value pair to access the host.
I saved the .pem file (which is the private key part of the key pair). This is the last step. The instance is now launched and can be connected to.
The next post will look into further configuring the EC2 I setup.

3 comments: