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