How to Build a Serverless REST API with Node.js, TypeScript, and AWS DynamoDB

preview_player
Показать описание


Getting Started with AWS Lambda and Serverless Framework (video):

Getting Started with AWS Lambda and Serverless Framework (article):

Social Media:

Software used in the video:

Thank you for watching and see you soon!

00:00 Intro
00:49 Creating new Serverless Project
03:13 Configuring auto-formatting with Visual Studio Code
04:10 Infrastructure: Creating DynamoDB as a Resource
07:53 Infrastructure: IAM Role Statements
09:27 Building Create(POST) and Read(GET) Endpoints
21:05 Deploying and Testing basic POST and GET Endpoints
23:55 Implementing Update(PUT) Endpoint
27:55 Removing Code Duplication by Error Handling Introduction
34:28 Delete(DELETE) and List(GET) Endpoints Implementation
37:47 Testing PUT, DELETE and List(GET) Endpoints
41:15 Fixing Content-Type Response Header Issue
44:11 Adding Request Body Validation
52:48 Testing REST API with the Input Validation
56:26 Ideas on what to next
57:15 The End
Рекомендации по теме
Комментарии
Автор

Thank you .. this was a great video and got me started. great content will watch all other videos :)

emiremark
Автор

Thanks ! You validation part is very valuable ❤

nipunchathuranga
Автор

Wow, thank you so much. Really love your tutorials. Would be really nice to create an authoriser for our API gateway!
Thank you mate!

ol
Автор

Would be nice to have a second part with authentication and authorization, also with some fron end fro users to request acces. Just an idea ! Thanks fro the great video

jordivallverdu
Автор

new sub, great video, your wallpaper is 10/10

martindanielperezpuchuri
Автор

Thank you man, you saved me hours of study

solomontemitayo
Автор

Very useful, thanks. Had to run "npm install" before deploy after adding uuid and then yup dependencies, or it would fail on the server once API is called since after yarn alone apparently packages are not being deployed.

nftsasha
Автор

Can you explain why you use .promise() but don't set that promise to a variable to process fulfilled/rejected states? For example, in createProduct() you have:
await docClient
.put({
TableName: tableName,
Item: product,
})
.promise();

You add it at 15:30, but I don't really understand what the .promise() is doing

mattriese
Автор

Thanks for the great video.

I got the error: The CloudFormation template is invalid: Template error: instance of Fn::GetAtt references undefined resource ProductsTable.

How can I fix it?

luuquanghung
Автор

I can use that syntsx on the events within framework serverless? Mybresources on aws are deployed by terraform and just need yo creare the code for lambda function and tests
And my api is a api websockets

eRcK
Автор

each time I deploy using serverless deploy I get this error after some time loading
Serverless: Uploading service products-api.zip file to S3 (16.88 MB)...
Serverless: Recoverable error occurred (Your socket connection to the server was
not read from or written to within the timeout period. Idle connections will be closed.), sleeping for ~5 seconds. Try 1 of 4

I searched everywhere and no solution

spacetium
Автор

Hey dude. This video was so useful. I have one question though.
Where's the DB located?
When I sign up to my IAM and go to DynaoDB I do not see ProductsTable.
Then where is it located?

sciency_stuff
Автор

Hi bro, I have a company as AWS solutions architect, I am still in training, I dont have knowledge of html/css/js/node.js rest-api dynamo.db, is it necessary for me to learn all these then create a application and test in AWS ?

M.ojo.M
Автор

Can we see a similar video which follows a aTDD approach?

nwigweuzochukwu
Автор

I got an error Stack [product-api-dev] does not exist

tosinolugbenga
Автор

you're not using Express.js right?

TCErnesto
Автор

Don't use aws-sdk, its outdated. Use the modular v3 SDK.

lordpablo
Автор

Amazon SDKs tend to get very ugly and abandoned in future

browaruspierogus