1 00:00:00,080 --> 00:00:01,740 ‫So now let's talk about the ways 2 00:00:01,740 --> 00:00:04,260 ‫you can track your cost in the cloud. 3 00:00:04,260 --> 00:00:06,440 ‫The first way is to use the Billing Dashboard, 4 00:00:06,440 --> 00:00:09,410 ‫which will show you all the cost actually for the month, 5 00:00:09,410 --> 00:00:11,680 ‫the forecast, and the month-to-date. 6 00:00:11,680 --> 00:00:13,280 ‫This is a very high level tool, 7 00:00:13,280 --> 00:00:15,580 ‫but it will be helpful to just get an overview 8 00:00:15,580 --> 00:00:16,880 ‫of what's happening. 9 00:00:16,880 --> 00:00:18,150 ‫And on the same page, 10 00:00:18,150 --> 00:00:21,570 ‫you will also get access to the AWS Free Tier Dashboard 11 00:00:21,570 --> 00:00:24,780 ‫which will show you the usage for each three tier 12 00:00:24,780 --> 00:00:27,550 ‫based on what you've been doing so far for the month. 13 00:00:27,550 --> 00:00:30,580 ‫So I can access my Billing Dashboard by clicking 14 00:00:30,580 --> 00:00:33,050 ‫on my account and clicking on my Billing Dashboard, 15 00:00:33,050 --> 00:00:35,700 ‫or you can go to find services and just type billing 16 00:00:35,700 --> 00:00:38,370 ‫to also access your Billing Dashboard. 17 00:00:38,370 --> 00:00:40,490 ‫So the Billing Dashboard, as I said, is pretty high level. 18 00:00:40,490 --> 00:00:42,260 ‫It will show the cost for the month. 19 00:00:42,260 --> 00:00:45,340 ‫So for this month I spent $14.60. 20 00:00:45,340 --> 00:00:46,200 ‫This is on my course. 21 00:00:46,200 --> 00:00:49,230 ‫Why? Because I paid for my domain name for $12. 22 00:00:49,230 --> 00:00:51,460 ‫I paid for config. I said, config was not free. 23 00:00:51,460 --> 00:00:53,700 ‫I paid for KMS because I created a KMS key. 24 00:00:53,700 --> 00:00:55,250 ‫And again, that was not free. 25 00:00:55,250 --> 00:00:56,220 ‫And then finally, 26 00:00:56,220 --> 00:00:58,780 ‫I have some taxes associated with my account. 27 00:00:58,780 --> 00:01:00,970 ‫So this is how much I spent to date, 28 00:01:00,970 --> 00:01:02,430 ‫and it gives me a high level overview 29 00:01:02,430 --> 00:01:05,260 ‫of what's going on for my account. 30 00:01:05,260 --> 00:01:06,093 ‫If I scroll down, 31 00:01:06,093 --> 00:01:08,710 ‫I can see the Top Free Tier usage by service. 32 00:01:08,710 --> 00:01:10,320 ‫So again, part of my dashboard. 33 00:01:10,320 --> 00:01:13,090 ‫And if I want more information, I can click on view all, 34 00:01:13,090 --> 00:01:15,930 ‫and this will give me my Free Tier service usage. 35 00:01:15,930 --> 00:01:19,200 ‫And I can see, for example, that for Amazon is free. 36 00:01:19,200 --> 00:01:22,500 ‫I have this many request and here's my forecasted usage. 37 00:01:22,500 --> 00:01:24,760 ‫And so I will see that I will be over the free tier. 38 00:01:24,760 --> 00:01:27,100 ‫So maybe I want to disable what is doing request, 39 00:01:27,100 --> 00:01:28,420 ‫which I expect it to be 40 00:01:28,420 --> 00:01:30,400 ‫the server access logging, for example. 41 00:01:30,400 --> 00:01:31,233 ‫And for Amazon, 42 00:01:31,233 --> 00:01:33,340 ‫it's free for the request 43 00:01:33,340 --> 00:01:36,030 ‫as well here on the get request, I'm good to go. 44 00:01:36,030 --> 00:01:37,340 ‫I'm still under the free tier, 45 00:01:37,340 --> 00:01:40,050 ‫and my forecast is also good as well. 46 00:01:40,050 --> 00:01:42,810 ‫For EC2, I can see that I've used 18 hours 47 00:01:42,810 --> 00:01:44,470 ‫of t2.micro so far. 48 00:01:44,470 --> 00:01:47,430 ‫My forecasted usage is 177 hours, 49 00:01:47,430 --> 00:01:50,340 ‫and I have overall in the month, 50 00:01:50,340 --> 00:01:54,440 ‫750 hours of t2.micro that is going to be free. 51 00:01:54,440 --> 00:01:56,680 ‫So this Free Tier service usage dashboard 52 00:01:56,680 --> 00:01:58,400 ‫is really helpful to see how your tracking 53 00:01:58,400 --> 00:01:59,850 ‫on your cost for this course. 54 00:01:59,850 --> 00:02:01,330 ‫And obviously if something looks wrong, 55 00:02:01,330 --> 00:02:02,752 ‫for example, for Amazon is free, 56 00:02:02,752 --> 00:02:04,470 ‫free to delete all the buckets 57 00:02:04,470 --> 00:02:07,683 ‫and you should be good to go, and it will be a lot safer. 58 00:02:08,870 --> 00:02:11,920 ‫Okay, so next we want to explore our bill a bit deeper. 59 00:02:11,920 --> 00:02:14,690 ‫So for this, we're going to use Cost Allocation Tags. 60 00:02:14,690 --> 00:02:16,350 ‫They will allow us to track our cost 61 00:02:16,350 --> 00:02:19,150 ‫on a detailed level and group them together. 62 00:02:19,150 --> 00:02:22,200 ‫For example, I have defined a Cost Allocation Tag, 63 00:02:22,200 --> 00:02:23,700 ‫and then you export your report, 64 00:02:23,700 --> 00:02:25,270 ‫and then you would get the cost 65 00:02:25,270 --> 00:02:27,750 ‫by category in Excel formats. 66 00:02:27,750 --> 00:02:29,007 ‫So for this, you can use different tags. 67 00:02:29,007 --> 00:02:32,430 ‫You can use the AWS generated tags, for example. 68 00:02:32,430 --> 00:02:33,970 ‫They will be automatically applied 69 00:02:33,970 --> 00:02:35,350 ‫to the resource that you create 70 00:02:35,350 --> 00:02:38,250 ‫and they will start with the AWS prefix. 71 00:02:38,250 --> 00:02:40,720 ‫For example, aws:createdBy, 72 00:02:40,720 --> 00:02:42,963 ‫and you can also define your own user tags 73 00:02:42,963 --> 00:02:44,825 ‫that will be defined the user 74 00:02:44,825 --> 00:02:47,823 ‫that will start with a prefix user:. 75 00:02:47,823 --> 00:02:48,940 ‫And this will be helpful, for example, 76 00:02:48,940 --> 00:02:52,340 ‫to tag your resources and then have them grouped 77 00:02:52,340 --> 00:02:56,060 ‫by cost center, by tag, by owner, by stack, 78 00:02:56,060 --> 00:02:58,440 ‫by application, and so on. 79 00:02:58,440 --> 00:03:00,420 ‫You can use tagging as well to create groups. 80 00:03:00,420 --> 00:03:02,988 ‫So tags are used for organizing resources. 81 00:03:02,988 --> 00:03:05,060 ‫For example, your EC2 instances, 82 00:03:05,060 --> 00:03:07,760 ‫your images, your load balances, your security groups, 83 00:03:07,760 --> 00:03:11,460 ‫your RDS databases, your VPC resources, Route 53, 84 00:03:11,460 --> 00:03:13,550 ‫your IAM users, et cetera, et cetera. 85 00:03:13,550 --> 00:03:16,450 ‫And if we create resources through CloudFormation, 86 00:03:16,450 --> 00:03:18,210 ‫they will all be tagged the same way. 87 00:03:18,210 --> 00:03:21,300 ‫If you're member it from the CloudFormation hands on. 88 00:03:21,300 --> 00:03:22,762 ‫There is free naming for your tag. 89 00:03:22,762 --> 00:03:23,750 ‫You can do whatever you want. 90 00:03:23,750 --> 00:03:26,920 ‫But common tag names are going to be Name, Environment, 91 00:03:26,920 --> 00:03:29,510 ‫Team, cost center, and so on. 92 00:03:29,510 --> 00:03:32,180 ‫And these tags can be used for cost reasons, obviously, 93 00:03:32,180 --> 00:03:34,250 ‫but also to create resource groups 94 00:03:34,250 --> 00:03:37,500 ‫to create, maintain, and view a collection of resources 95 00:03:37,500 --> 00:03:39,290 ‫that will share the common tags, 96 00:03:39,290 --> 00:03:41,963 ‫and you can edit those using the Tag Editor. 97 00:03:42,840 --> 00:03:44,370 ‫So to show you where that would be, 98 00:03:44,370 --> 00:03:48,640 ‫you would go in the search and you type resource groups, 99 00:03:48,640 --> 00:03:50,400 ‫and you arrive onto the resource groups 100 00:03:50,400 --> 00:03:52,340 ‫and Tag Editor console, 101 00:03:52,340 --> 00:03:56,780 ‫and you open one tab here and one tab for Tag Editor, 102 00:03:56,780 --> 00:03:58,710 ‫and this would allow you to edit your tags 103 00:03:58,710 --> 00:04:00,150 ‫for your resources. 104 00:04:00,150 --> 00:04:02,960 ‫So for example, for the Tag Editor in here 105 00:04:02,960 --> 00:04:05,260 ‫I can look at resource types of, for example, 106 00:04:05,260 --> 00:04:09,510 ‫security groups for EC2, and I will search my resources. 107 00:04:09,510 --> 00:04:12,670 ‫I will find all the security groups and I can, for example, 108 00:04:12,670 --> 00:04:15,170 ‫manage the tag of the selected resources, 109 00:04:15,170 --> 00:04:18,210 ‫and say that, yes, I'm going to add a tag of department 110 00:04:19,520 --> 00:04:21,620 ‫and then say, IT. 111 00:04:21,620 --> 00:04:23,550 ‫Review and apply the tag changes, 112 00:04:23,550 --> 00:04:26,690 ‫and it will apply the tag to all these resources. 113 00:04:26,690 --> 00:04:28,530 ‫And then I can create resource groups. 114 00:04:28,530 --> 00:04:30,350 ‫And I say, okay, it's going to be tag based. 115 00:04:30,350 --> 00:04:33,540 ‫I can select the resource type or so do all resource types. 116 00:04:33,540 --> 00:04:34,373 ‫So this is great. 117 00:04:34,373 --> 00:04:35,770 ‫And I will say, for example, 118 00:04:35,770 --> 00:04:39,490 ‫that I want my departments to be IT, add it, 119 00:04:39,490 --> 00:04:41,430 ‫and here I will have to see 120 00:04:41,430 --> 00:04:42,970 ‫that if I preview my resource groups, 121 00:04:42,970 --> 00:04:45,140 ‫I can find the five security groups 122 00:04:45,140 --> 00:04:46,500 ‫that I've tagged from before, 123 00:04:46,500 --> 00:04:49,810 ‫then we can call it IT resources 124 00:04:49,810 --> 00:04:51,910 ‫and then create on create group. 125 00:04:51,910 --> 00:04:53,780 ‫And we don't need a space. 126 00:04:53,780 --> 00:04:58,270 ‫I'm going to have IT-Resources. 127 00:04:58,270 --> 00:04:59,103 ‫Here we go. 128 00:04:59,103 --> 00:05:01,400 ‫And I have created my first resource group 129 00:05:01,400 --> 00:05:02,233 ‫based on this tag. 130 00:05:02,233 --> 00:05:04,670 ‫And this is very helpful to see what belongs 131 00:05:04,670 --> 00:05:05,970 ‫to different departments. 132 00:05:05,970 --> 00:05:08,890 ‫And you can use these tags for cost purposes. 133 00:05:08,890 --> 00:05:10,020 ‫So on the left hand side, 134 00:05:10,020 --> 00:05:12,350 ‫I can click on Cost Allocation Tags, 135 00:05:12,350 --> 00:05:14,380 ‫and then we can see all these tags right here, 136 00:05:14,380 --> 00:05:17,310 ‫activate them, and then generate a report 137 00:05:17,310 --> 00:05:19,180 ‫based on these tags. 138 00:05:19,180 --> 00:05:22,600 ‫So now let's talk about the reports we can generate in AWS. 139 00:05:22,600 --> 00:05:24,970 ‫We can generate a cost and usage report 140 00:05:24,970 --> 00:05:27,620 ‫to dive deeper into your cost and usage, 141 00:05:27,620 --> 00:05:29,380 ‫and they will give you an information 142 00:05:29,380 --> 00:05:31,920 ‫and it's going to be the most comprehensive sets 143 00:05:31,920 --> 00:05:34,855 ‫of cost and usage data available on AWS. 144 00:05:34,855 --> 00:05:37,790 ‫It will include all the additional metadata about services, 145 00:05:37,790 --> 00:05:39,380 ‫the pricing, and the reservations. 146 00:05:39,380 --> 00:05:41,360 ‫So you can get some information, for example, 147 00:05:41,360 --> 00:05:44,670 ‫around your Amazon EC2 Reserved Instances usage. 148 00:05:44,670 --> 00:05:48,070 ‫This cost report will give you all the AWS usage 149 00:05:48,070 --> 00:05:50,230 ‫for each service category used by an account 150 00:05:50,230 --> 00:05:53,990 ‫and its IAM users in hourly or daily line items, 151 00:05:53,990 --> 00:05:56,250 ‫as well as any tags that you have activated 152 00:05:56,250 --> 00:05:58,410 ‫for cost allocation purposes. 153 00:05:58,410 --> 00:06:01,130 ‫And this report can be integrated and analyzed 154 00:06:01,130 --> 00:06:03,970 ‫using Athena, Redshift or QuickSight 155 00:06:03,970 --> 00:06:05,730 ‫which is a dashboarding tool. 156 00:06:05,730 --> 00:06:07,150 ‫So this report looks like this. 157 00:06:07,150 --> 00:06:10,150 ‫It is going to be the most granular report you can get 158 00:06:10,150 --> 00:06:11,680 ‫with the most comprehensive data, 159 00:06:11,680 --> 00:06:13,370 ‫and will describe everything 160 00:06:13,370 --> 00:06:16,960 ‫for every cost when it was incurred, why it was incurred, 161 00:06:16,960 --> 00:06:19,530 ‫and the description of the associated cost. 162 00:06:19,530 --> 00:06:21,710 ‫So this is definitely a report you may want to use 163 00:06:21,710 --> 00:06:23,470 ‫to analyze your bill in details, 164 00:06:23,470 --> 00:06:26,603 ‫and really understand where a charge is coming from. 165 00:06:27,710 --> 00:06:30,210 ‫Next, we have Cost Explorer which is a more visual tool 166 00:06:30,210 --> 00:06:31,910 ‫in which we visualize, understand, 167 00:06:31,910 --> 00:06:34,560 ‫and manage your cost and usage over time. 168 00:06:34,560 --> 00:06:36,280 ‫You can create custom reports that will analyze 169 00:06:36,280 --> 00:06:39,320 ‫the cost and data, but it is for a high level, okay? 170 00:06:39,320 --> 00:06:42,550 ‫You can get your total cost and usage across all accounts, 171 00:06:42,550 --> 00:06:45,740 ‫or monthly, or hourly, or at the resource level. 172 00:06:45,740 --> 00:06:48,000 ‫And with this Cost Explorer tool, 173 00:06:48,000 --> 00:06:50,950 ‫you will be able to access your optimal savings plan 174 00:06:50,950 --> 00:06:53,160 ‫to lower the prices on your bill. 175 00:06:53,160 --> 00:06:54,500 ‫And most importantly, 176 00:06:54,500 --> 00:06:57,600 ‫you can forecast usage up to 12 months 177 00:06:57,600 --> 00:07:00,970 ‫based on the previous usage which is an exam question. 178 00:07:00,970 --> 00:07:03,040 ‫So if you're looking for a tool that will allow you 179 00:07:03,040 --> 00:07:05,610 ‫to forecast your bill for 12 months ahead, 180 00:07:05,610 --> 00:07:07,730 ‫then it's going to be Cost Explorer. 181 00:07:07,730 --> 00:07:08,770 ‫So here is an example, 182 00:07:08,770 --> 00:07:11,090 ‫with Cost Explorer you can get the Monthly Cost 183 00:07:11,090 --> 00:07:12,487 ‫by AWS Service. 184 00:07:12,487 --> 00:07:13,820 ‫And as you can see here, 185 00:07:13,820 --> 00:07:16,770 ‫you will get these graphs based on each different month. 186 00:07:16,770 --> 00:07:20,090 ‫And it will give you, in example, for EC2 Instances, 187 00:07:20,090 --> 00:07:23,180 ‫which one are costing you money, as well as the types. 188 00:07:23,180 --> 00:07:25,870 ‫You can get hourly and resource level information. 189 00:07:25,870 --> 00:07:28,800 ‫So this is your cost every hour with, 190 00:07:28,800 --> 00:07:31,190 ‫again, the cost defined by EC2 Instance, 191 00:07:31,190 --> 00:07:33,300 ‫so you can understand which EC2 instance 192 00:07:33,300 --> 00:07:35,980 ‫is costing you more every single hour. 193 00:07:35,980 --> 00:07:37,880 ‫And we can define Savings Plan, 194 00:07:37,880 --> 00:07:41,010 ‫which is again, an alternative to using Reserved Instances. 195 00:07:41,010 --> 00:07:42,850 ‫And so you would get recommendations 196 00:07:42,850 --> 00:07:46,600 ‫on savings plans right away, directly from Cost Explorer. 197 00:07:46,600 --> 00:07:50,750 ‫Finally, as I said, you can forecast usage on Cost Explorer. 198 00:07:50,750 --> 00:07:54,160 ‫So for example, you can have a look at your previous cost 199 00:07:54,160 --> 00:07:57,060 ‫and then you can go up to 12 months ahead of time 200 00:07:57,060 --> 00:08:00,370 ‫to forecast your usage and see how much is going to cost you 201 00:08:00,370 --> 00:08:03,640 ‫to use AWS in the future based on the growth 202 00:08:03,640 --> 00:08:06,300 ‫you have been experiencing in the past. 203 00:08:06,300 --> 00:08:09,140 ‫So you will find the Cost and Usage Reports 204 00:08:09,140 --> 00:08:10,810 ‫on the console on the left hand side, 205 00:08:10,810 --> 00:08:13,860 ‫to just enable the reports and then create the reports. 206 00:08:13,860 --> 00:08:16,590 ‫So you need to enable those if you wanted to have it, 207 00:08:16,590 --> 00:08:19,180 ‫and it will take about 24 hours to populate them, 208 00:08:19,180 --> 00:08:20,640 ‫and you can create a report. 209 00:08:20,640 --> 00:08:24,010 ‫I'll call it demo report, that will include everything, 210 00:08:24,010 --> 00:08:26,830 ‫including maybe resource IDs, click on next, 211 00:08:26,830 --> 00:08:29,960 ‫and then I could deliver it to an S3 bucket. 212 00:08:29,960 --> 00:08:31,520 ‫So I would select a bucket I have, 213 00:08:31,520 --> 00:08:35,980 ‫for example, my demo ccp-cloudfront, who knows, 214 00:08:35,980 --> 00:08:37,200 ‫and then I'll click on next. 215 00:08:37,200 --> 00:08:39,440 ‫I will say, yes, I will allow the building report 216 00:08:39,440 --> 00:08:42,510 ‫to write my S3 buckets, click on save, 217 00:08:42,510 --> 00:08:44,950 ‫and then I will say, okay, this is a Valid Bucket, 218 00:08:44,950 --> 00:08:45,810 ‫and it works. 219 00:08:45,810 --> 00:08:47,000 ‫I want to get hourly data. 220 00:08:47,000 --> 00:08:49,010 ‫I want to create a new report version, 221 00:08:49,010 --> 00:08:51,750 ‫and maybe you want to enable report data integration. 222 00:08:51,750 --> 00:08:55,030 ‫I'll click on next, and then click on Review and Complete, 223 00:08:55,030 --> 00:08:58,010 ‫and this will deliver to me, my billing reports, 224 00:08:58,010 --> 00:08:59,760 ‫my cost and usage reports directly 225 00:08:59,760 --> 00:09:02,730 ‫into this Amazon S3 bucket. 226 00:09:02,730 --> 00:09:04,010 ‫So this is one example. 227 00:09:04,010 --> 00:09:06,350 ‫And then the second one is going to be around Cost Explorer, 228 00:09:06,350 --> 00:09:11,350 ‫which is a more visual way to view your bill. 229 00:09:11,690 --> 00:09:15,140 ‫So this is going to give me some usage data in my accounts. 230 00:09:15,140 --> 00:09:17,040 ‫Obviously, I don't have many cost in here 231 00:09:17,040 --> 00:09:18,980 ‫so it's not going to be fascinating, 232 00:09:18,980 --> 00:09:20,150 ‫but what you can do, 233 00:09:20,150 --> 00:09:21,870 ‫again, with Cost Explorer, 234 00:09:21,870 --> 00:09:25,060 ‫is to get recommendations on saving plans 235 00:09:25,060 --> 00:09:25,994 ‫on the left hand side, 236 00:09:25,994 --> 00:09:27,380 ‫so if you want to save some more, 237 00:09:27,380 --> 00:09:28,840 ‫so these are the recommendations. 238 00:09:28,840 --> 00:09:32,830 ‫And then you can also forecast the month end cost directly 239 00:09:32,830 --> 00:09:34,510 ‫based on previous month usage, 240 00:09:34,510 --> 00:09:36,740 ‫all the up to 12 months ahead. 241 00:09:36,740 --> 00:09:38,930 ‫So that's it for this lecture, I hope you liked it 242 00:09:38,930 --> 00:09:40,930 ‫And I will see you in the next lecture.