Welcome back to Backspace Academy. In this lecture we'll have a look at the 2
application integration and customer engagement services will then have a 3
look at some examples and finally we'll finish up with a hands-on lab where 4
we're going to use the SES service to send an email attributes step functions 5
makes it easy to coordinate the components of distributed applications 6
and micro services using a visual workflow for example you may want a 7
second function to always follow the first and only run if and when the first 8
succeeds and you may want to execute two functions in parallel for example you 9
define your application visually as a series of steps you define the process 10
flow of those steps and then you can deploy your application automatically 11
Amazon simple workflow service works in a similar way to step functions in 12
coordinating multiple components of a business process for new applications 13
it's recommended to use step functions not the swf service Amazon 14
simple notification service or SNS for short is a flexible fully managed pub/sub 15
messaging service what that means is that you can create a topic and users 16
subscribe to that topic and when you publish a message to the topic the users 17
that have subscribed to that topic will receive that message it can also be used 18
for push notifications for mobile devices Amazon simple queue service or 19
sqs for short is a fully managed Message Queuing service and that makes it easy 20
to decouple your applications from demand what that means is that it allows 21
messages to build up in a queue until the processing server that processes 22
those messages can catch up with the demand 23
so let's have a look at an example of using these services to decouple our 24
application from its demand so let's just say we have an application and it's 25
running on an auto scaling group of ec2 instances and that application is a 26
process server it's not a web server it's processing messages as they come in 27
and those messages could have information on an image that needs to be 28
processed or a video that needs to be processed or a cryptography problem that 29
needs to be solved and so those messages come in and as that demand increases or 30
the number of messages coming in increases then the auto scaling group 31
will also add more instances to cope with that increasing demand so what 32
happens if the increase in demand occurs over a one-second period and that is a 33
very large spike our auto scaling group cannot handle that sort of scenario 34
because it's going to take at least five or ten minutes for instances to launch 35
and be up and running so what happens in the meantime is a problem for us 36
in a similar way that a bank has a queue and so when people come into a bank and 37
the teller is too busy to serve them they can build up in a queue until such 38
point in time that the teller can reach them we can do the same thing with the 39
sqs or simple queue service we can let those messages come in and they can 40
build up in a queue until such time that our auto scaling group of ec2 instances 41
can get to that queue and empty out the queue and that is great because we have 42
now decoupled our demand from our application and so if spikes come in our 43
application can handle it but what happens when the average demand 44
exceeds what our capacity is so I'll give you an example so we've got our 45
bank and all of a sudden we had five tellers and four of those tellers have 46
become sick they've got influenza or whatever but the same amount of people 47
are coming through the door and the queue is going to build up and 48
build up and the queue will never decrease it will continue to increase in 49
size indefinitely the same thing can happen in this architecture for example 50
we might have a whole heap of unhealthy instances and all of a sudden our 51
capacity cannot meet demand and so that sqs queue is going to grow indefinitely 52
or we may have done an update to our application that is faulty and that sqs 53
queue continues to increase so what we can do is that we can set up a cloudwatch 54
metric and that will alert us with an SNS email notification that our sqs 55
queue is continue continuing to grow and that we need to investigate that further 56
now normally we would use a metric on the instances to signal that those 57
instances are overloaded and we need to increase our capacity of our auto 58
scaling group now in this situation that's probably not going to happen 59
because these messages are just going to build up in the queue and so we need a 60
way of notifying the auto scaling service that the queue is increasing and 61
the way we can do that is whether again a cloud watch metric that will alert the 62
auto scaling group that the sqs queue is too big and to put on more instances to 63
reduce the size of the queue and at the same time when the queue is empty 64
cloudwatch can send a metrics to the auto scaling group to reduce the number 65
of instances and terminate those so that we're not wasting those resources 66
let's have a look at some customer engagement services Amazon Connect is a 67
self-service contact center in the AWS cloud and that is delivered on a 68
pay-as-you-go pricing model it has a drag-and-drop 69
graphical user interface and that allows you to create process flows that define 70
customer interactions without having any coding at all Amazon Pinpoint allows 71
you to send email SMS and mobile push messages for targeted marketing 72
campaigns as well as direct messages to your individual customers for example an order confirmation 73
Amazon simple email service or SES for short is a 74
cloud-based bulk email sending service and coming up next we're going to be 75
doing a lab using the simple email service to send an email so make sure 76
that you download the introduction to AWS lab notes and let's get into it 77
in the AWS management console we go to 78
services and over on the right-hand side here we've got messaging services we 79
click on SES and the first thing we need to do is we need to verify our email 80
address so we just go to email addresses and we'll put in our or we click on here 81
to verify a new email address and then we click on verify this email address so 82
what's happened now is that AWS has sent an email to us to verify our email once 83
we click on that link we'll be able to continue to use the SES service 84
ok so when you've clicked on the verification link to the email you'll get a 85
congratulations message that you've verified your email so just click out of 86
that and go back into the SES management console if we refresh the screen we can 87
see that it has now been verified so what we can do now is that we can send a 88
test email so just click on send a test me you know we'll put in what I'm going 89
to do is just send a message from myself to myself so that I don't have to verify 90
any further or any additional email addresses and just put the subject is 91
test and we'll send that test email and that will be happening and so what we 92
can do is we'll go into our email account and we'll see that that test 93
email will have been sent. OK so I've just gone and checked my email account and 94
yes that test email went through fine, now you might be questioning what do we do now 95
it's one thing to send a single email but that's not much good to us we 96
want to send out bulk email now obviously sending out bulk email is well 97
it can be can be spam so AWS is mindful of that 98
and so there is a process that you have to go through to apply to use the 99
SES service to send our bulk email. So the way you do that is you go into 100
sending statistics here and 101
you can see there is a link there to request a sending limit increase, so just 102
reading off if so your Amazon SES account has sandbox access in 103
region US East Virginia and so that is very limited to what you can do and so if 104
you're going to be using this in for example in in an enterprise application 105
then you would want to go there and request a sending limit increase and so 106
just click on that and it will take you to a form that you fill out with all 107
your details and and you just submit that to the AWS support department and 108
they will make that happen for you so that's all I need to show you now on the 109
SES service and I look forward to seeing it in the next one