Thursday, March 30, 2017

Creating a Key Pair for EC2

In the next few we will look into how to create Linux and Windows instances and then login into those instances. But, before that we need to create a Key Pair.

Usually, username/password combinations are used to login into a Linux or a Windows instance. But, in the case of AWS a Key Pair is used to login by default. We can also change the authentication from the default Key Pair to username/password. There are pros and cons of both username/password and Key Pairs. More about the Key Pairs here.

AWS provides a management console (1), which is sort of Web UI to manage the different services. Each service has a different management console (EC2 has one, S3 has one, VPC has one etc). Open the management console (1) in a browser and enter the credentials. Search for EC2 and select `EC2 - Virtual Servers in the Cloud`.


The EC2 management console looks like as below.


In the left pane click on the Key Pairs. When you login for the first time into the AWS management console, there won't be any Key Pairs.


Click on `Create Key Pair` to create a new one. Give it a name.


You will be promoted to download a file with a pem extension. The file name will be the same as the Key Pair name. Save the file in a safe location, without this file it won't be possible to login to the EC2 instances (Windows and Linux). Usually I store them in Dropbox. Also, don't share this file with others as they would be able to login to your Windows and Linux instances which you own.


The Key Pair which has been created appears in the console as shown below. Upto a maximum of 5,000 Key Pairs can be created per Region. We will look into what a region is in one of the upcoming blog.


Note that there is no charge to create a Key Pair in AWS. In the upcoming blog, we will look into how to create a Linux and Windows instance and log into it.

Getting started with AWS

Cloud is all rage now. I am going with the assumption that the readers are familiar with what Cloud is. If not here are some quick starters (1, 2) to know more about the same. Along with the blogs on Big Data, I will also blog on Cloud Computing. So, have fun.

Practice, practice, practice - there is no other alternate to become good at something. The first step is to create an account with AWS here.


I won't be going through the sequence of steps for creating an account as it's the same as creating an account with any other site. You can provide your credit or debit card and you will be billed based upon your usage. Nothing more, nothing less.

Usage of what? AWS has 10's of services like EC2 for creating an instance in the Cloud, EBS for creating a block based storage and so on. They had been adding new services and new features on a regular basis. An instance is a virtual server in the cloud, on which you can deploy apps, do some processing etc. Depending on the service that has been used you will be billed automatically. Nothing less or nothing more. More about the pricing here and here.

As mentioned above, an EC2 service is for a Linux or a Windows instance. There are different EC2 pricing models (on-demand, spot, reserved, spot), here is the pricing for the on-demand instances. For these types of instances there is no commitment and you can demand when ever you want to. The pricing is rounded hourly, so if you use an instance for 5 minutes, still you will be charged for an entire hour. Don't worry the charge is very less, depending on the size of the server.


The hourly price depends on the OS (linux is cheaper than windows), region where you want the instance (Mumbai, North Virginia etc), size of the server (t2.nano being the cheapest and p2.16xlarge being the costliest). There had been so much competition in the Cloud space, the vendors had been cutting down the prices on a regular basis.


While creating an instance in the Cloud, it's better to pick a smaller instance for the sake of learning so that we won't get a hefty bill at the end of month. For the sake of beginners, AWS gives a couple of freebies for the first one year once the account has been created. More details here. One of the freebie is 750 hours/month of t2.micro server (Windows and Linux) for 12 months. So, you can start an EC2 instance of t2.micro for one year and pay nothing for 1 year. If two instance are started then we can run it 6 months for free.

A thing of caution is to return the resource back to Amazon once you are done with it, this way AWS can allocate the resource to someone else and stop your billing. The billing starts for someone else.

Go ahead and create an account with AWS using the link here. And in the next blog, we will look into how to create an Linux instance in the Amazon Cloud and log into it. As time goes, we will look into some of the advanced features of the AWS Cloud.

Thursday, March 23, 2017

Got through `AWS Certified Solutions Architect - Associate`

Today I got through the AWS Certified Solutions Architect - Associate. Recently I got an opportunity to work on the AWS Services and so decided to take the certification. It took me close to 60 hours for the preparation. It was fun. So, here it is


I took the extended version of the exam. It had 20 additional questions, 30 more minutes with a nice 50% discount on the price. The additional questions were mixed in the exam and were a bit tough. They were not included in the pass grade. One can't clearly say which were the additional questions. I think Amazon was doing some sort of A/B testing on the certifications and so the discount.

There are a total of 9 certifications (1, 2) including the 3 beta certifications which were introduced this year. For some reason the links to the AWS beta certifications (security, big data and networking) are no more working. I am planning to complete as many as I can, especially the AWS Big Data Specialty Certificate.

Here are a few tips

- Read the user guide and the FAQ for the different services
- Watch the videos in the AWS YouTube channel
- Do practice a lot
  
Next, I am planning for the `AWS Certified Developer - Associate` for the next certificate. Will update the blog later on the same.