How To Quickly Debug AWS Lambda - VS Code & Serverless Framework

preview_player
Показать описание
❗️Today I share two tips to quickly debug Lambda functions using Serverless Framework and VS code.
1. VSCode debugger
2. Mock your Lambda event

🧠 Whatever you do, absolutely do not push to the cloud every time you want to test a change!

---

WHO AM I: I'm Dylan, a Cloud Engineer living in Bend, Oregon. I use my background in tech to make videos about technology that enables and grows businesses.

---

🌍 My website / blog -
Рекомендации по теме
Комментарии
Автор

Can we also debug by connecting to DynamoDB? If you have instructions, please prepare a video on how to debug connecting local to DynamoDB.

rgizpyu
Автор

Nice video. I generally prefer to pass a mock event into the function to simulate an invocation, rather than hardcoding a local `body` object.

jonlinnell
Автор

amazing video!
Excellent best practices

gabrielrodriguesricardo
Автор

This is awesome. Is there a way to activate the breakpoints from a serverless offline function as well?

rw-dc
Автор

Nice video! I'm trying to debug lambda locally but execution takes around 25 seconds. Lambda just retreives data from Timestream Database. I'm trying to use any option that could avoid rebuilding each time docker containers, do you have any idea or do you have found a similar problem when interacting with resources deployed on the cloud such as databases?

rogerolivedelgado
Автор

That's a great tutorial, but how would you debug a function locally that has cloud context?

For example, a Lambda function that can only be accessed by logged-in users, needs to write to DynamoDB and needs to access SSM secrets?

Автор

Remind me again why we should add a huge overhead to development by using FaaS instead of just using Docker/Fargate?
Lambdas are very powerful but they are a terrible replacement for a full backend micro-service.

RougeCognito
Автор

Did he leave the mock data in there? So now 1 loaf of bread is gonna be 1 16 kcal carrot? lol

deemon
Автор

i was doing this but im having problem on the ERR! that says package.json can't be found. THe compiler finds teh package.json on but it should be How can the compiler see it on another folder? Please help me! Thank you

gracewood