Understanding Lambda Layers0:00
In this video we're going to cover the concept of layers. We'll use our browser function as an example. In our browser function we can add a layers method. Let's look at the parent class. You can see in the parent class that we return an array and it's this long string here. This is called an ARN string. An ARN string is an Amazon resource name. It's basically just a unique identifier within Amazon. Layers are pretty simple to understand. They're just zip files. When you deploy a lambda function you have the runtime. That's the lowest level. Here this is a Node.js runtime but it can be any kind of runtime that you want. That's the base level. On top of the runtime you can instruct AWS to add a layer or multiple layers and that just adds extra stuff to your runtime. In our
Using BrowserShot on Lambda3:56
review where we're at right now. We have about 35 lines of php which is pretty basic. I mean there's not even really any logic in here. And about 30 lines of JavaScript. And we have headless Chrome running on AWS Lambda on top of infrastructure we don't manage shipping a Chrome binary that we don't have to compile ourselves. Obviously in here you can do all kinds of things. Instead of pulling the page title you could fill out some forms. You could do some scraping. You could do anything you wanted. Hopefully this is starting to stoke your imagination about all the cool things you can do with Lambda. As Laravel developers many of us use Spatie's BrowserShot package. Let's take a look at how we can use BrowserShot on Lambda.
Laravel developers many of us use Spotsy's BrowserShot package. Let's take a look at how we can use BrowserShot on Lambda.
