Practice Exams:

SAP-C02 Amazon AWS Certified Solutions Architect Professional – New Domain 4 – Cost Control part 3

  1. EC2 Pricing Models

Hey everyone and welcome back to the Knowledge Portal video series. So in today’s lecture we will be looking into the pricing aspect of the EC to instance. Now, since in most of the organizations, most of the people will be using EC two instance. And this is the reason why EC to cost proves to be the major cost within an AWS account. And this is the reason why we should understand the EC to related pricing aspect in great detail as a solutions architect so that we can tune it according to our environment and it will be a cost effective solution. So let’s go ahead and understand more about the EC to pricing options which are available. So, as of now, there are four models available. One is on Demand instance, second is Reserved instance, third is Spot instance. And fourth is Dedicated instance.

So let me just show you because we are just going into the theoretical part. So if you go into the EC to console, you’ll see within the instances there are four types of instances which are present. One is the on demand instance, second is the Spot instance, third is the Reserve and fourth are the dedicated host. And as a solutions architect we should understand about each of these instance as well as the advantages and disadvantages that each of these brings in our organization. So let’s go back to our PBT presentation. So we looked into four types of instances. Let’s go ahead and talk about each one of them. Now, when you speak about on demand instance, it basically means that with on demand instance we pay for the compute capacity per hour or Amazon even recently introduced per second based billing depending upon the instances which is being run.

Now, this is a very important factor because if you are running your instance, let’s assume for 2 hours, then you pay only for 2 hours. And this is what on demand instance is all about. Now, one of the big benefits of running on demand instance is that there is no upfront payments which we have to do. So we don’t have to pay anything upfront to Amazon whenever we want it. We can run our instance, we can stop the instance and we’ll only be charged for the amount of time the instance is running. This is one benefit. Second benefit is that we can increase or decrease the capacity whenever it is needed. This is also very important. Like I am running an on demand instance with two GB Ram today and tomorrow I find that two GB Ram is not making the website fast.

So what I do, I upgrade it to four GB Ram. So this flexibility is there with on demand instances. Now, there are certain challenges with on demand instance that everyone should know. Now, let’s take an example for this. So, on Monday there are 500 customers using 16 GB Ram on demand servers individually. So this is the perspective of the cloud service provider. So let’s assume that I have a cloud environment and I have 500 customers who are using 16 GB Ram servers individually. Now, this is the Monday. Now, when you talk about Venice date, you have only ten customers are using 16 GB Ram on demand servers individually. So within two days you see there is so much of difference which came on Monday.

There were 500 customers who were running 16 GB Ram servers, however, on Wednesday it was just ten customers. So as a cloud provider it becomes extremely difficult to have a capacity planning because if 500 customers are able to run 16 GB rans individual servers, it is definitely a know that the cloud service provider has so many servers available. So when you look into the cloud service provider perspective, a CSP will not have a clear picture on how many servers should they provision, because even a service provider needs to buy the servers. And if the cloud provider do not know on what is going to be used in the future, it becomes very difficult to do a capacity planning. So in case a cloud service provider brings a lot of service, then there will be a lot of unused resources and money will be wasted.

However, if the cloud service provider buys less servers, then there will be money loss because the person will not be able to or the customers will not be able to provision new servers and that will be a loss for cloud service provider. So in both the cases, the cloud service provider is losing money and this is the reason why ideally, a cloud service provider do not really like on demand instances. But this is one of the features which customers like. So they provide. So this is the first type. Now second type is the Reserved instances. Now, this is very important to understand because reserved instance provides us with a significant discount which is up to 70% compared to the on demand instance pricing.

This is very important to understand. Reserve instances provides a huge discount. But there is one caveat that we have to tell cloud service provider beforehand, that for one year or for three years, we will be needing certain amount of capacity. So this is something which cloud provider really needs and this is the reason why they provide good discounts. So when you go for a reserved instance, a reserved instance are assigned to a specific availability zone and it provides capacity reservation for AWS easy to instance. Now, this is very important because many times when you try to launch an on demand instance, you might get an error saying that the resources has reached its limit. So you’re not able to create more servers because the cloud provider does not have a resource.

And if you are running it in production and if you’re not able to launch server during critical time, this leads to a lot of issues. And this is the reason why you should go with reserve instance which also provides capacity reservation. So what are the things that you need to tell to cloud provider if you are opting for a reserved instance is that if you know that you will always be running 20 servers of m four dot two x last type, then pi reserved instance for them. So if you are sure that your production server will be minimum of 20 of this specific type, then you can buy the reserved instance of this and AWS will give you a significant amount of discount for those reserve instance.

However, one thing that you have to make sure that you have to commit for at least one year and it ranges from one year to three years. So you have to commit a minimum of one year for the reserve instance that you will be looking for. Now let’s look into the Reserved instance and on demand instance related pricing. So on demand instance the assumed price is $0. 4. So this was for m four large base instance. So if you look into the total three year cost, if you are running on demand instance, so you have $0. 4 per R into 26280 R. So these are the rs of three years. When you multiply it, it becomes $10,500. So $10,500 for running a m four large instance continues for three years.

Now, what happens when you buy a three year all upfront based Reserved instant? Then the hourly cost reduces tremendously. So you see it becomes zero point $17 and the amount that you have to pay after three years is $4,200 and the total savings that you will have is $65. So if you will see, there is a huge amount of savings that you can look forward for provided you are going for the reserve instances. Now, let me just show you on how can you calculate this. Now there is one really nice website called as the Simple Monthly Calculator. So this is the URL calculator s three Amazona. com index HTML. So what you need to do over here, just click on the row over here you select the instance type.

Now let me select instance type as m four dot xlarge, you click on Close and Save and in the billing option you see the monthly cost is $146. So this is the price of on demand. So if you’re running info xlash instance based on on demand pricing, then you’ll have to pay $146. Now, if you click over here there are various options you have OnDemand and then you have Reserved. So within reserved also there are various subsections of Reserved instances but we will ignore those things for the time being. So let’s look into the three year all upfront Reserved instances. So what you basically do here is you say to AWS that I need this m four dot XLAT instance for three years and you pay the money at the start of the cycle.

And this is what is called as a three year all upfront reserved instance. And now if you look into the effective hourly cost, then it is zero point 75. And the monthly cost if you will see it, is $54. 89. Let’s round it up to $55. So reserved instance three year all up front is $55. However, the on demand instance is $146. So you see, reserved instance $55, on demand instance $146. So there is a tremendous amount of difference that comes when you choose a reserved instance and on demand instance. And this is the reason why understanding these is very important. Because most of the organization will need a cost cutting related initiative and this is where your costing related skill set will be helpful as a solutions architect. Perfect. So we looked into two of them. Now let’s look into the third type which is called as the Spot instance.

So what basically happens is Spot instance allows us to build on spare, easy to computing capacity for up to 90% of the on demand cost. Now, it might happen, let’s assume that I am a cloud service provider and I have 256 GB Ram available all the time. Now, my customers are only using 120 GB of Ram. So effectively what I have, I have 140 GB Ram which is free. No one is using that. So instead of no one using and I am not gaining any money, what I can do is I can give additional discount to the customer saying that you can use these resources like one and 120 GB Ram with a very minimal cost. And that is why it says up to 90% of the on demand cost. So this is how AWS works. So if AWS has spare resources, then you can get those spare resources at a very huge discount.

But one caveat is that we have to do bidding. It’s not like you can get directly the Spot instances. You have to bid and the bid which is the best will win the Spot instance. So let me show you on how exactly that would work. So, if you go into the Spot instances over here, click on Request Spot Instance and if you go down over here, you see I have an instance type of C, four large. So this is the instance type that I am looking for. You have to specify the VPC as well. And within your last option you see it, there is a maximum price. And here you can set your maximum price. So here I am putting zero point $11. Now, if other person has bidded lower than my amount, then they will not get the instance. However, if my bid is the highest, then the Spot instance will come to me.

And this is how things really work. So you have to do a lot of bidding in Spot instances. Now, there is one caveat that if someone bids higher than you after you have launched your Spot instance, then your instance will get terminated at that time only. So this is very important to understand. So this is about Spot instance. Remember, Spot instance are recommended for application which can have flexible start and end times. So you have to be very sure that your application will not get affected if your Spot instance gets terminated after five minutes or after ten minutes. So that is something that you have to look forward for. However advantage is that you get a huge discount when you run Spot instances. So this is the third type and the fourth type is called as the dedicated host. A dedicated host is basically a physical easy to server dedicated for your use only.

Now, generally what happens in the virtualization environment is that there is a single server and within the single server there is a virtualization software like KBM or Zen. And on top of that, there are multiple virtual servers which are created. So if this is a single dedicated server, when you install a virtualization software, you might have a ten virtual machines on top of it. Now, the problem here is that these virtual machines will not have a very fast performance and for certain use cases you need a raw performance directly and in those cases you use a dedicated host. Now, one good thing about dedicated host is that it can be purchased on demand as well as the reserved instances. So this is it about the EC to pricing option. I hope you understood the basics about various pricing models which are available.

And if you are running infrastructure on AWS, and if you are planning to continue to run infrastructure on AWS, then you should definitely opt for not opt for on demand instances and instead go for reserved instances. So, I have gone to many of the startups and one of the major factor over there is that they are struggling with the infrastructure cost. And when I look into the infrastructure, it is definitely seen that most all of the instances which are created are based on on demand and that is where the issue lies. So this is it about this lecture, one simple exam preparation so that you can know on what type of questions can be asked related to the pricing related aspect.

So let’s look into this slide where you have a CFO and your CFO is concerned because of the increased cost of your AWS account. Now, Ubin Solutions Architect has been assigned to decrease the monthly cost. It is found that 80% of your overall costs are part of EC, two instances which are launched. Now how will you reduce the cost? Now this is one scenario that you will find in many of the organization where you are working. And one of the the simplest answer if this is asked an exam is to switch to reserved instances. So this is something that will help you reduce the cost in a longer term. So this is it about this lecture? We’ll definitely have more challenging questions in our quiz.

  1. Reserved Instances

Hey everyone and welcome back to the Knowledge Pool video series. And in today’s lecture we are going to speak about Reserved Instances. Now in the earlier lecture we had a broad overview related to the pricing models which were on Demand, Reserved and Spot instances. Now today we’ll be speaking specifically about Reserved Instances because there are various categories of Reserved Instance. So we need an individual lecture by itself. So let’s go ahead and understand more about Reserved Instances. So there are three type of rice. So Ri basically stands for Reserved Instances and there are three types. One is standard. Second is convertible and third is scheduled. So standard Reserved Instance basically it provides the most significant discount of OnDemand and are most suited for steady state usage needs.

So when you are 100% sure that I will be needing a M four x large instance continuously for one year maybe in Availability Zone one A, then you can straightforwardly go for Standard Reserved Instance. This will give you the maximum discount. Now. Second is convertible. Reserved instance. These also provide good amount of discount but not as much as the standard Ri. So you see up to 54% of on demand and provides flexibility to change attribute of Reserved Instance. This is very important. So let’s assume that for the first three months you need a M four large instance. After first three months you are not very sure you might want to switch to C four Xlarge instance. So during the time when you are not 100% sure about the instance family, about instance type or even about the tenancy, then you should go with the convert table Reserved Instance.

Remember that if you are using a standard reserve instance, you will not be able to change the instance family like from M four to C four. That flexibility is not there for standard you have to go for Convertible if you are unsure about your requirements related to various attributes. We’ll be discussing more about this in the next slide. And the third type of Ri is scheduled Ri. So this is basically suitable for recurring scheduled and it basically allows us to launch instances within the time window. So if you are aware that every Sunday from ten to six you need a specific instance reservation, then you can do that with scheduled Ri. So let’s talk more about convertible ri. As far as exams are concerned, we have to be more aware about the standard Ri in the Convertible Ri and the associated difference.

So with Convertible Ri we can convert to a new instance family. This is a very big point example from R three to M four, from M four to C four, from C four to T two. So basically we are changing the instance family. This is possible with convertible ri. This is not possible with standard ri. Next is we can convert to a newer operating system. Let’s assume from Windows to Linux or even from Linux to windows. So this flexibility is also present. Third is we can convert to new instance price. So after six months if AWS decides to reduce the price, we can take that advantage if you are using the convertible Ri. Next is convert to an instance size. Remember, there’s a difference between an instance family and instance size. There are various instance family like R, you have M which is general purpose.

You have C which is compute optimized, right? You have various instance families. When you talk about instance size, it means within the same instance family but only the instance size is changing. For example M four x two M four two x. So you see here M four remains the same. So that is about the instance size. Then you have the flexibility to convert the tenancy between dedicated to default. So example, this is one of the examples where you can change the tenancy.And last but not the least, you can even convert to different payment option. Let’s assume if by from no upfront to partial upfront. So all of these flexibility you have when you choose a convertible Ri.

But as we have already discussed, this flexibility comes with less discount. So if you are using a convertible Ri, you have actually much more lesser discount as compared to standard deserved instance. Now, don’t go with these numbers, these numbers keeps on changing. So I am currently am recording lecture. Now after let’s assume one week or two weeks these numbers will constantly change. So we don’t really have to remember these numbers. But just understand that standard RH does provide a better discount when compared to convertible Rs. Perfect. So our next important point to remember is the capacity reservation. Because most of you have heard that we do get capacity reserved ration when we go with reserved instances.

But one very important thing to remember is that capacity reservation only applies if we go with Zonalbased reserved instance and not regional based. So let me just show you, this is one thing which is quite important. So if I go to reserved instance and if I go to purchase reserved instances within the offering class, you will see you have standard and you have convertible. So these are the two major offering class which is available. Now whenever you choose. Let me assume, let me just select the M four x large. So by default the instance that comes over here, this is a regional Ri. So regional Ri has its own benefit that we can launch our instance in any availability zone within that specific region, whether US East one A or USC one B or US East one C.

That is the flexibility that we have at regional Ri. But regional Ri does not give us the capacity reservation. So if you see over here on the top right there is an option only show offering that reserves the capacity. So if we select here, then we get a new option of Availability Zone. So if I just deselect it, you see the Availability Zone option went away. So this becomes the regional array. And if I select here, then the Availability Zone option comes and we need to select a specific Availability Zone. So if you want a capacity reservation, then you have to go for an Availability Zone. So this is one important thing for us to remember. So coming back to our PowerPoint presentation, let’s understand things with the scenario so that it will become much more beneficial.

So we have a scenario where we have a customer who is running following instances. So you have customer running two M four large instance in US East one A and US East one B region respectively. So basically you have customer with M four large instance in USD one A and second M four large instance in US East one B. So there are in total two M four large instances. Then you have two T, two large instance running across US East, one B and US east, one C. So you have one T, two large in US east, one B and one T, two large in US East, one C. So this is the scenario. Now, customer has following reserved instance, they have one M four large with default tenancy in US East one B, which is the Zonal Ri.

So this is the Zonal Ri. And the customer has two T two large reserved instance capacity with US East One as a Regional Ri. So now the question is how much customer has to pay additional, if any? And the answer to this is customer has to pay for one M four large instance because the current reserve instance is only one X M four large that two of US East one B region. So the customer has to pay for US East one A region because it does not suffice to the Zonal Arai. So this is the basic we’ll have a lot of scenarios in the quizzes section. I’ll be formulating many of them so that the concept becomes much more clear.

  1. Understanding the normalization factor

Hey everyone and welcome back. Now continuing a journey with the reserved instance lectures. Today we are going to understand about normalization factor. So this is quite important point to understand specifically when it comes to reserved instances. So we already discussed that in standard as well as in convertible rice, we can change the instance size. As far as standard is concerned we can change instance size, but we cannot change instance family. However, with convertible aries we can change both instance size as well as instance family. So when we talk about instance size flexibility, reserve instance provides us the flexibility to change the instance size.

So today I am using let’s say T two large and tomorrow the load is quite low and if I want to switch to T two medium, I have that flexibility to do that both in standard reserved instance as well as in convertible. Now, for some of the smart guys out here, the question that generally comes is that if we have already paid all upfront for reserved instance and now I want to change from T two medium reserved instance to T two large without paying anything, is it possible? And the answer is no. So how exactly can we know whether we can change the instance size flexibility without paying any additional money? And the answer to this is the normalization factor.

So every instance that we launch has a specific normalization factor. So I’m sure that you are a bit confused related to what we have been discussing and we’ll understand this with a better example. Let me just open up the EC to console and when you click on purchase reserved instance and let me just select one you see it is giving us the normalization factor. So let’s say the normalization factor is four. Over here, if I go for M four xlarge, the normalization factor changes. So every instance size has a specific normalization factor. Now, when you talk about instance size flexibility, let’s understand this with the example.

So let’s assume that we have a reserve instance for C four ATEX large instance type.So we have reserved instance here. Now C four eight x large. You’ll see it has the normalization factor of 64. So it is not necessary that we only have to launch one instance of eight x large. This is not compulsory. We can actually launch either one instance of C four eight x large. This will suffice. We can launch two instance of C four four x large. So when you talk about C four four x large, it has the normalization factor of 32. So if you multiply 32 into two, the answer is 64. So you can actually launch two C four four x large. And that would also be in the limit of reserved instance. So you won’t have to pay additional money. You can even launch four instance of C four two x large.

So now C four x large as a normalization factor of 16. So 16 into four is 64. So you can launch four instance of C four two x large, or you can even launch 16 instance of C four large. So c four large is four. So you can launch 16 instance of C four large. Now, along with this, you also have a flexibility. Like you can combine one C four x large. So c four x large has the normalization factor of eight and eight C four large instances. So you can actually combine multiple instance within the same instance family and it should prove within the reserved instance capacity.

So even if you purchase one reserved instance capacity for C four x large, you can actually launch even 16 instances and everything will be within the same reserve instances offering. So this is one of the example. Remember this c four can be different. So you can put M four, you can even put R three. The main important factor over here is the instance size and the normalization factor. So even when you go with M instances, you have M four large, you have M four x large, you have M four two x large. So this changes, but the normalization factor remains the same even for the different instance family.