Working with AWS Lambda

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
19 hours 19 minutes
Difficulty
Intermediate
CEU/CPE
20
Video Transcription
00:00
>> Hey everybody and welcome back.
00:00
In this lecture, we're going to discuss AWS Lambda,
00:00
which is another compute service.
00:00
In this lecture,
00:00
learning objectives are going to be to describe
00:00
the serverless technology and talk a little bit
00:00
about the Lambda service and how that works.
00:00
Here we go, here we are, it's serverless time.
00:00
Now, funny enough,
00:00
I'm going to just go ahead and say it.
00:00
Serverless does still involve servers,
00:00
but it doesn't involve you managing it,
00:00
which is why we call it
00:00
serverless. Oddly enough, I don't know.
00:00
Yes, it does not equal servers and you managing,
00:00
but under the hood, it's still a server
00:00
that is still going to be running everything for you.
00:00
You're just not worried about anything virtual.
00:00
You're not worried about any operating systems
00:00
or hard drives or any of that stuff.
00:00
All of that is already taken care of.
00:00
The only thing you need to do is write and deploy
00:00
your code which is awesome.
00:00
If you're a developer, this is a great service to
00:00
leverage and it's very scalable,
00:00
is very available, it's very secure.
00:00
There's a lot of
00:00
really cool benefits with using serverless.
00:00
It was pioneered by the Lambda service offered by AWS,
00:00
but other Cloud providers have offered up
00:00
their flavor of it as well.
00:00
We are seeing this leveraged quite prevalently,
00:00
especially when it comes to
00:00
microservice architectures which is
00:00
definitely beyond the scope of this exam.
00:00
But if you're curious and you
00:00
really want to sink your teeth into the Cloud,
00:00
I would definitely encourage you look it up.
00:00
AWS Lambda is a virtual function
00:00
and it is running on top of a server.
00:00
It does have some virtualization
00:00
going on behind the scenes,
00:00
but all of that is taken care of by AWS,
00:00
so you don't have to worry about any of it.
00:00
What you do need to do is
00:00
you need to write your application code,
00:00
and when you go to set up a function,
00:00
you're going to set up a runtime for set function.
00:00
That runtime is obviously going to be
00:00
determined based on the language of the code.
00:00
If you're running a PHP application, select PHP runtime.
00:00
If you're running a Java application,
00:00
select Java runtime and
00:00
you can deploy your code and go from there.
00:00
How it works though,
00:00
is that your code only runs when it is being triggered.
00:00
When there's an events, it triggers
00:00
your code and then your code or the function
00:00
executes and then your code is running and it
00:00
runs for a short period of time.
00:00
Then it goes to sleep,
00:00
and it goes to sleep until it's run again,
00:00
and that's how it goes.
00:00
Lambda is very, very cost-effective because you're
00:00
only paying for when it's running,
00:00
and actually AWS gives you a lot of free runs.
00:00
I want to say it's like in the,
00:00
I think it's one million. It could be 500,000.
00:00
I don't know if they've changed it recently,
00:00
but they give you a lot of runs at first.
00:00
Actually, I think it's just consistent that
00:00
you always get so many free runs per month.
00:00
After that then you have to pay,
00:00
it's like pennies per run that
00:00
goes for each time that your function runs.
00:00
Very, very cost-effective.
00:00
It's honestly extremely cheap when you
00:00
compare it to a container,
00:00
or especially an EC2 instance
00:00
is going to be a lot more cost-effective that way.
00:00
In that sense is also easily scalable.
00:00
Of course, you can automate it very easily as well.
00:00
A couple of things to note though with Lambda
00:00
is that sometimes you run into
00:00
some compliance concerns with running
00:00
Lambda because you don't have
00:00
very good management over the underlying environment.
00:00
Like I said the server, the operating system,
00:00
whether it's shared or whether it's dedicated hosts,
00:00
all of those details,
00:00
you don't know what's going on.
00:00
When it comes to regulatory compliance in the Cloud,
00:00
it can be a service
00:00
that you are running into issues with and
00:00
the regulations just won't let you do it because you
00:00
don't know what the short tendency
00:00
is like and those situations
00:00
sometimes you can not
00:00
benefit from the cost efficiency of Lambda.
00:00
You have to use an EC2 instance,
00:00
that's just the trade-off.
00:00
But in most situations where you're not
00:00
dealing with that type of regulation, Lambda is great.
00:00
If all you're doing is writing code,
00:00
it's a great way to build out
00:00
your application and to do it cheaply. That is Lambda.
00:00
So some benefits. Oh yes, here we go.
00:00
So my apologies, I forgot I had written this slide.
00:00
With free tier, you get one million lambda requests and
00:00
400,000 gigabytes of compute time.
00:00
You pay per requests and you pay for
00:00
the compute time after you've hit those thresholds.
00:00
It integrates with the whole AWS service catalog.
00:00
I don't know if I've already said that,
00:00
but yes, it does.
00:00
It does integrate with everything.
00:00
It can run all different programming languages.
00:00
You're not going to be quizzed on any of that.
00:00
You're just going to be quizzed
00:00
on primarily what Lambda is
00:00
and maybe a couple
00:00
of scenario questions where you can see Lambda,
00:00
and they're going to ask you which service would
00:00
be a function that can run the application,
00:00
and it's cost-effective and
00:00
managed and fully available like in
00:00
that situation all those characteristics would lead up to
00:00
Lambda not ECS or EC2 or anything like that.
00:00
Yeah. Just be on the lookout for that.
00:00
But you're probably not going to see a lot
00:00
of questions on this service.
00:00
It's going to be easily monitored by CloudWatch,
00:00
so you can see it's along with other services in
00:00
AWS via the CloudWatch so you can monitor it that way.
00:00
That's it. Like I said,
00:00
not a lot to be concerned
00:00
about in this exam when it comes to Lambda,
00:00
but it is a very beneficial service and you should
00:00
definitely learn more about it.
00:00
In this lecture, we covered
00:00
an overview on the serverless technology.
00:00
We did an intro on AWS Lambda, and that's it.
00:00
Feel free to check out some labs.
00:00
I really like Lambda quite a bit.
00:00
I've done some personal labs built
00:00
like WordPress sites on my local and I ran it.
00:00
I actually use Lambda
00:00
to convert the dynamic WordPress site to static.
00:00
Then hosted the static site using S3.
00:00
It was a very, very cool lab
00:00
project that I was just
00:00
curious about and I wanted to do it.
00:00
But there's so many other projects you can do,
00:00
so be sure to take a look around
00:00
and see what serverless projects are going on
00:00
and see how you can leverage the AWS Lambda
00:00
to mess around and play
00:00
with those projects so you can learn.
00:00
So that wraps up this lecture here,
00:00
and I'll see you guys in the next one.
Up Next