در حال بارگذاری ...

Series Overview0:00

In this series, we'll be learning how to develop serverless functions with Laravel. You may be familiar with the term serverless from Laravel Vapor. Vapor allows you to deploy your entire Laravel application into AWS, where it runs on Lambda and a number of other services. You may have also heard of the serverless framework. The serverless framework is a lot like Vapor in that it allows you to deploy entire applications, but this is not Laravel specific. So Vapor and serverless do the same kind of thing where they let you deploy your application into AWS where it runs on Lambda, but what we're going to be talking about is developing single functions that run on Lambda, not entire applications.

AWS Lambda Basics1:13

So the servers are still there. You just don't have to think about them. If we scroll down a little bit, we can take a look at some of the promises of AWS Lambda. You can run code without provisioning or managing infrastructure. All you do is write the code. You can respond to requests at any scale from dozens to hundreds of thousands per second, and you're only charged when your code is actually running, so you can save a lot of money if you have really spiky workloads. In this series, we'll be using a package I created called Sidecar. Sidecar is a Laravel package that takes all the pain out of deploying and executing Lambda.

Introducing Sidecar Package1:42

In this series, we'll be using a package I created called Sidecar. Sidecar is a Laravel package that takes all the pain out of deploying and executing Lambda functions. So if you wanted to write a function in Node or Python or Ruby or any of these languages that Lambda supports, you would use Sidecar to package, deploy, and execute that function from within your Laravel application. There's no complicated API gateway, there's no separate deploy process, and you can run these functions from your Laravel app no matter where your Laravel app is hosted. So if your app is hosted on Forge, your local machine, Heroku, wherever your app is hosted, you can run these functions.

How Sidecar Executes2:17

So if your app is hosted on Forge, your local machine, Heroku, wherever your app is hosted, you can run these functions. The functions will live in AWS Lambda, and your app will execute them through the AWS SDK. By the end of this series, you'll feel confident working with serverless functions from your Laravel application. Let's get started.

Serverless Functions

دوست دارید گاهی خبرهای Laracasts را ایمیل کنیم؟