1 00:00:11,710 --> 00:00:16,000 Welcome back to BackSpace Academy. In this lecture we'll have a look at the 2 00:00:16,000 --> 00:00:21,160 different management services on AWS. We'll then finish up with a hands-on lab. 3 00:00:21,160 --> 00:00:27,120 We will use the CloudWatch service to implement a billing alert on our account. 4 00:00:27,120 --> 00:00:33,040 CloudFormation allows you to use a text file to define your infrastructure and, 5 00:00:33,040 --> 00:00:39,550 to use his text file to deploy resources on the AWS cloud. This allows for the 6 00:00:39,550 --> 00:00:44,800 defining of your infrastructure as code and you can manage your infrastructure 7 00:00:44,800 --> 00:00:52,480 with the same version control tools that you use to manage your code. The AWS 8 00:00:52,480 --> 00:00:57,399 Service Catalog allows enterprises to catalogue resources that can be deployed 9 00:00:57,399 --> 00:01:02,649 on the AWS cloud. This allows an enterprise to achieve common governance 10 00:01:02,649 --> 00:01:09,190 and compliance for its IT resources by clearly defining what is allowed to be 11 00:01:09,190 --> 00:01:17,740 deployed on the AWS cloud. AWS CloudWatch is a monitoring service for AWS 12 00:01:17,740 --> 00:01:23,860 cloud resources and applications that are deployed on the AWS cloud. It can be 13 00:01:23,860 --> 00:01:28,390 used for triggering scaling operations or it can also be used for providing 14 00:01:28,390 --> 00:01:36,220 insight into your deployed resources. AWS Systems Manager provides a unified user 15 00:01:36,220 --> 00:01:41,680 interface that allows you to view operational data from multiple AWS 16 00:01:41,680 --> 00:01:48,310 services and to automate tasks across your AWS resources. That helps to shorten 17 00:01:48,310 --> 00:01:54,520 the time to detect and resolve operational problems. AWS CloudTrail 18 00:01:54,520 --> 00:02:00,850 monitors and logs AWS account activity including actions taken through the AWS 19 00:02:00,850 --> 00:02:05,950 management console, the AWS software development kits, the command-line tools 20 00:02:05,950 --> 00:02:12,820 and other AWS services. So this greatly simplifies security analysis of the 21 00:02:12,820 --> 00:02:21,010 activity of users of your account. AWS Config enables you to assess, audit 22 00:02:21,010 --> 00:02:27,639 and evaluate the configurations of your AWS resources. This simplifies compliance 23 00:02:27,639 --> 00:02:32,700 auditing, security analysis, change management and control and also, 24 00:02:32,700 --> 00:02:40,389 operational troubleshooting. AWS Opsworks provides managed instances of Chef and 25 00:02:40,389 --> 00:02:46,120 Puppet. Chef and Puppet can be used to configure and automate the deployment of 26 00:02:46,120 --> 00:02:53,560 AWS resources. AWS trusted advisor is an online expert system that can analyze 27 00:02:53,560 --> 00:02:59,049 your AWS account and the resources inside it and then advise you on how to 28 00:02:59,049 --> 00:03:05,949 achieve high security and best performance from those resources. 29 00:03:05,949 --> 00:03:09,639 Ok, let's have a go at using one of these management services. We're going to use the 30 00:03:09,639 --> 00:03:14,620 billing and cost management console and the CloudWatch service to create a billing alert 31 00:03:14,620 --> 00:03:19,750 and that will notify us when our account has exceeded a budgeted amount 32 00:03:19,750 --> 00:03:24,519 and it will do that using the simple notification service and we'll learn 33 00:03:24,519 --> 00:03:29,070 more about the SNS in the next lecture. 34 00:03:30,819 --> 00:03:37,610 Okay so starting off in the AWS management console. The first thing that 35 00:03:37,610 --> 00:03:43,129 we need to do is that we need to enable billing alerts on our account. So we go 36 00:03:43,129 --> 00:03:53,480 to our account up here and we select my billing dashboard. So from our billing 37 00:03:53,480 --> 00:03:57,140 and cost management dashboard we'll scroll down and we'll go to billing 38 00:03:57,140 --> 00:04:02,510 preferences and just make sure that you've got here that you're going to 39 00:04:02,510 --> 00:04:07,639 receive your invoices by email and you'll also see a checkbox here which 40 00:04:07,639 --> 00:04:12,560 is already checked for me because I've already enabled this, but for you it 41 00:04:12,560 --> 00:04:17,479 won't be so you need to click on this check box, it will then set up a process 42 00:04:17,479 --> 00:04:23,110 for you to authorize billing alerts to be received on your email address. 43 00:04:23,110 --> 00:04:30,229 So then you just simply save preferences. Once we've enabled our billing alerts on 44 00:04:30,229 --> 00:04:35,060 our accounts then we can go into the Cloudwatch service, So go to services 45 00:04:35,060 --> 00:04:44,539 and then Cloudwatch, and what we can do is, we can set up an alarm that is going 46 00:04:44,539 --> 00:04:50,690 to be triggered whenever our count exceeds a certain level in dollars. So we 47 00:04:50,690 --> 00:05:00,590 just go to alarms and we create an alarm. Here we need to select a metric and we 48 00:05:00,590 --> 00:05:05,120 have a number of metrics to select from. The ones that we want are billing. Now if 49 00:05:05,120 --> 00:05:11,599 you find that your screen doesn't look like this it is not that the video is 50 00:05:11,599 --> 00:05:16,940 wrong, it is not that the lab notes are wrong, it is that you are not in the US 51 00:05:16,940 --> 00:05:24,340 East North Virginia region. That is the only region that you can be in to set up 52 00:05:24,340 --> 00:05:30,409 billing alerts on your account. So we click on billing and the one we want to 53 00:05:30,409 --> 00:05:37,490 look for is total estimated charge. So we'll click on that, we'll select 54 00:05:37,490 --> 00:05:41,770 US dollars and we'll select that metric. 55 00:05:42,420 --> 00:05:48,640 Now what we need to do is, we need to specify the conditions around how this 56 00:05:48,640 --> 00:05:53,410 alarm is going to be triggered and, what's going to happen when the alarm is 57 00:05:53,410 --> 00:05:56,850 triggered. So we specify the metric and conditions. 58 00:05:56,850 --> 00:06:02,560 So we'll just scroll down. So it's going to be a static one. So it's going to be 59 00:06:02,560 --> 00:06:06,940 triggered whenever the value exceeds a certain limit. So it's going to be 60 00:06:06,940 --> 00:06:12,340 whenever it is greater than and we'll just put in there 10 US dollars because 61 00:06:12,340 --> 00:06:18,040 pretty well everything that we're doing so far will be on the free tier, so if we 62 00:06:18,040 --> 00:06:21,790 get anything going above ten dollars that should alert us to being a problem, 63 00:06:21,790 --> 00:06:28,720 and we'll click on next. So now we're going to come to where we need to 64 00:06:28,720 --> 00:06:34,960 configure the actions for this alarm. So what is going to happen when this alarm 65 00:06:34,960 --> 00:06:40,240 is triggered, what's going to happen when our count exceeds ten dollars. So what we 66 00:06:40,240 --> 00:06:46,270 need to select is in alarm. So whenever it exceeds this level it's going to go 67 00:06:46,270 --> 00:06:51,670 into an alarm. So what happens when it goes into an alarm stat? We're going to 68 00:06:51,670 --> 00:06:58,420 create a new SNS topic or simple notification service topic and, what that 69 00:06:58,420 --> 00:07:04,690 will do is, it will allow us to receive emails whenever this billing alert 70 00:07:04,690 --> 00:07:09,690 occurs. So we're just going to create a new topic. We'll give it a name there 71 00:07:09,690 --> 00:07:18,310 that will do and we're just going to put in our email address in and we create 72 00:07:18,310 --> 00:07:26,080 that topic. So what is going to go, what is going to happen now, is that you will 73 00:07:26,080 --> 00:07:32,860 receive an email from AWS to authenticate or validate that the email 74 00:07:32,860 --> 00:07:40,750 is actually yours. So if you go to your email account and there we can see that 75 00:07:40,750 --> 00:07:45,040 we've got an email that's come from Amazon and we just need to confirm that 76 00:07:45,040 --> 00:07:51,880 subscription. So if we click on that, and that will confirm that subscription. 77 00:07:51,880 --> 00:07:54,729 So AWS need to make sure that the email that is 78 00:07:54,729 --> 00:07:59,650 on there is actually an email that you are responsible for, that you own. 79 00:07:59,650 --> 00:08:02,189 So just close out of that 80 00:08:02,520 --> 00:08:06,610 So we'll just scroll down. We don't need to do anything else here, we just need to 81 00:08:06,610 --> 00:08:19,150 click on next. We'll just give our alarm a name and a description. 82 00:08:19,150 --> 00:08:21,759 We don't actually need to give it a description I'll just leave that empty it's pretty 83 00:08:21,759 --> 00:08:26,639 self-explanatory what this is, and we'll click on next. 84 00:08:26,639 --> 00:08:32,260 So that will detail now a preview of what's going to happen and the 85 00:08:32,260 --> 00:08:37,779 conditions around how it is going to be triggered and that we're going to give 86 00:08:37,779 --> 00:08:40,810 it a name there PCody billing alert of course yours will be different to that. 87 00:08:40,810 --> 00:08:53,620 So let's create that alarm. Okay so that alarm has been created. When this 88 00:08:53,620 --> 00:08:58,060 is first created you will get insufficient data because it takes time 89 00:08:58,060 --> 00:09:04,420 for Cloudwatch to actually receive information. So it's going to monitor 90 00:09:04,420 --> 00:09:09,010 this and then within six hours it's going to make an assessment as to 91 00:09:09,010 --> 00:09:14,319 whether that billing alert should be triggered and from there, if it is triggered, 92 00:09:14,319 --> 00:09:18,040 if it goes over that level that you've defined there of ten 93 00:09:18,040 --> 00:09:23,050 dollars then you'll receive an email that will come from the simple 94 00:09:23,050 --> 00:09:29,410 notification service. Okay so after a little bit of time, so in this situation 95 00:09:29,410 --> 00:09:34,089 my account is already well and truly over that ten dollar limit and so it's gone 96 00:09:34,089 --> 00:09:41,769 into an in alarm state, and at the same time I have received an email from AWS 97 00:09:41,769 --> 00:09:46,839 telling me that there is a problem with my account. It has exceeded that ten 98 00:09:46,839 --> 00:09:52,510 dollar billing alert limit. So that's how easy it is to actually set up a billing 99 00:09:52,510 --> 00:09:56,410 alert on your account and it is something that you should always do 100 00:09:56,410 --> 00:10:00,100 because you don't want any nasty surprises, like I said everything that 101 00:10:00,100 --> 00:10:04,029 we're doing so far will be on the free tier and, we'll learn more about that 102 00:10:04,029 --> 00:10:08,680 free tier, what is on the free tier and what is not. So if something is not 103 00:10:08,680 --> 00:10:11,620 on the free tier you need to make sure that you clean it up afterwards, so that 104 00:10:11,620 --> 00:10:16,420 you don't get a bill at the end of the month, but if you forget billing alerts 105 00:10:16,420 --> 00:10:20,980 are a great way to basically stop you from getting a big bill at the end of 106 00:10:20,980 --> 00:10:25,870 the month. So that brings us to an end and I look forward to seeing you in the 107 00:10:25,870 --> 00:10:28,230 next one.