Thank you so much! Some feedback on the video: the video was very clear on what to do, very well-spoken, very calm, the format was amazing as well. However one small thing that may help future viewers: I actually created a lambda function before watching this video and made the first few changes in the in-built code editor on the aws website. Which was a bad experience. So I did not have a template.yaml, which meant i could not use the "sam build" command, as it would throw an error. Instead what I realised I could do is: thru the aws extension in vs code, click on "Lambda" to expand it, find my lambda function, right click on it and select "upload lambda". Then select "Directory", then "Yes", choose the folder containing your js script, and select ok/confirm. This will update the code in the backend to match the code in your VS Code instance.
Wow, that tutorial was awesome! Simple and clear! A similar one but with CDK would be great. Thank you very much! I hope you get many more subscribers. The content, video format, quality and explanation are incredible.
Great video to begin with. I am having a small issue, after running the san build command, I am not able to see HelloWorld function under .aws-sam. I am doing my runtime in Python3.8, so is that because of this?
Great explanation, Thank you.🙂 Please make a video on "How to create serverless application by using AWS-SAM, LAMBDA, API-Gateway, any DB(like dynamoDB or mongoDB etc..) and it also includes swagger file by using nodeJS.
Jon, really excellent tutorial. I have one question. In my code I used a fetch function to HTTP Post to another server. Testing and run worked great locally. When I deployed --guided, I am getting error of needing global fetch in aws console. At one point you talk about zipping build file and uploading. Would this help getting away from functionality not support in the lamba node.js 18.x base image? Thank you.
Excellent vid, thank you. Do you know if there is a way to configure your AWS lambda account, to tell Amazon a max dollar amount you want to spend, and then if you accidentally exceed that amount with your resources, they either immediately notify you, or just simply shut down your site? I'd prefer it works that way. I'd hate to get a big surprise bill from amazon, because I didn't know my code was very inefficient, and the code was spending too much time during a function invocation.
Thanks @coderlicious6565. Yes, AWS Budgets is what you want - docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html. Will be doing a video on it in future. You'll get an notification if you exceed your budget, which is a good idea because I've forgotten about some stuff and had to pay £35 😁
@@Jonathan.Davies hey i man i know this might be a pain in the ass but if u could add chapters that would be amazing. after watching 4-5 of thes tutorials i just want to skip to the parts i need. just $0.02
Thanks for the super helpful introduction! I have a question: How do you get your local copy updated if you make a change in the AWS console UI? E.g. someone just made a "quick fix", is there a resync operation or pull from AWS?
Actually further to my first question -- is there a way to capture the metadata you set up in the AWS console (e.g. permissions, triggers) back into the local yaml (I assume that's where the permissions and triggers would go)?
Thanks for the great video! This is very helpful... but I do have one question I couldn't find an answer to, and I'll be happy to see a video that covers it: Is it possible to create multiple lambda functions within the same project (and deploy them)? If so - how? I have an API with multiple endpoints, and it does not make sense to create a new project for each endpoint... or is it?
Thanks for watching Doron. You can create multiple lambdas in the same project by just defining as many AWS::Serverless::Function's as you need in the template.yml (and making sure there is a corresponding codeUri link to to the code for the new lambda - the original function's code lives in hello-world/, you'd need to create ... - for example - ... hello-world-1/ and write the Lambda code in there ). This would allow you to have multiple lambdas in same project and deploy them. As for the multiple endpoints and multiple projects, without seeing your API or knowing your requirements, I'd agree that you don't need multiple projects. My HTTP API video (ua-cam.com/video/7u1p5dieIh8/v-deo.html) shows how you can have an API with multiple endpoints but this is only backed by one lambda. Will try and touch on this in more detail in future video 👍
No worries Arley. Alb isn't supported as an Event Source under SAM (docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-eventsource.html), you'll most likely need CloudFormation. People have been asking for the same thing here though - github.com/aws/serverless-application-model/issues/721, so maybe we will see it in a future release. Thanks for watching
Great video!! Questions: 1) I want to implement least privilege and am currently adding the permissions one by one according to the CloudFormation error logs outlining whatever permissions are still missing. Is there a way to figure out which permissions are required to deploy this CloudFormation stack (i.e., sam for lambda)? 2) The "outputs" section of template.yaml states that an API gateway endpoint will be created along with the Lambda instance and IAM role. Is it possible to change the default outputs, say, not creating an API Gateway endpoint since I want to invoke Lambda using the functional URL instead of the API Gateway?
Thanks Kristen. 1) The SAM CLI prompt to create the IAM role during deployment etc doesn't create anything extraneous but if you are taking extra effort to understand least privilege, this is probably your best approach to know exactly what's going on under the hood. 2) Yes, if you remove the API Gateway section and add a FunctionURLConfig under the function definition in the template.yml - you can then reference the FunctionURL in the outputs section. See this link for examples of both: docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-functionurlconfig.html
New sub here. Could you cover grabbing data from an http site then bringing it in through lambda into an S3 bucket? (I’m thinking metrics from a site like Prometheus)
Thanks for subbing and commenting Nate. I've got a video on API Gateway coming soon - part of that shows how you can inject a http request into the event that your Lambda receives (which could apply to part of your scenario). Either way - sounds like a good idea. I'll look into it
Pssst be sure to subscribe. It’s free 😁
Thank you so much! Some feedback on the video: the video was very clear on what to do, very well-spoken, very calm, the format was amazing as well.
However one small thing that may help future viewers: I actually created a lambda function before watching this video and made the first few changes in the in-built code editor on the aws website. Which was a bad experience.
So I did not have a template.yaml, which meant i could not use the "sam build" command, as it would throw an error. Instead what I realised I could do is:
thru the aws extension in vs code, click on "Lambda" to expand it, find my lambda function, right click on it and select "upload lambda". Then select "Directory", then "Yes", choose the folder containing your js script, and select ok/confirm. This will update the code in the backend to match the code in your VS Code instance.
thanks for your mic investment, we can hear and understand very clearly
short, concise, and super helpful, thank you so much for this!
Wow, that tutorial was awesome! Simple and clear! A similar one but with CDK would be great. Thank you very much! I hope you get many more subscribers. The content, video format, quality and explanation are incredible.
Thank you Jaime! It's made me very happy to hear you enjoyed it, so that's kind of you to say. Good idea with CDK too. Thanks for watching 👍
very concise tutorial. helped a lot!
great tutorial man! Expecting more contents in SAM-AWS
Cheers bro 👊
Awesome intro, thanks.
Great content you put it through.
Keep it up
Great video to begin with. I am having a small issue, after running the san build command, I am not able to see HelloWorld function under .aws-sam. I am doing my runtime in Python3.8, so is that because of this?
wonder why theres no content hosted my website thanks to your tutorial and now learning lamda thanks to your channel.
Great explanation, Thank you.🙂
Please make a video on "How to create serverless application by using AWS-SAM, LAMBDA, API-Gateway, any DB(like dynamoDB or mongoDB etc..) and it also includes swagger file by using nodeJS.
Thanks Ragini - that's nice of you to say. Good idea 👍
Great video mate. Earned a sub :) BTW, please make a video on how to locally debug an existing Lambda functions and bring it to VSCode. Cheers!
Thanks for the sub Jefferson 🙏
great vocalization!
Great stuff man :)
Perfectly Demonstrated !!!
Thanks Mandheer 👍
good work, thank you for the intro
Thanks @kazanjyan
Thanks. Good explanation
Thanks Vitalii 👍
awesome man, thanks a lot!
Jon, really excellent tutorial. I have one question. In my code I used a fetch function to HTTP Post to another server. Testing and run worked great locally. When I deployed --guided, I am getting error of needing global fetch in aws console. At one point you talk about zipping build file and uploading. Would this help getting away from functionality not support in the lamba node.js 18.x base image? Thank you.
Excellent vid, thank you.
Do you know if there is a way to configure your AWS lambda account, to tell Amazon a max dollar amount you want to spend, and then if you accidentally exceed that amount with your resources, they either immediately notify you, or just simply shut down your site? I'd prefer it works that way.
I'd hate to get a big surprise bill from amazon, because I didn't know my code was very inefficient, and the code was spending too much time during a function invocation.
Thanks @coderlicious6565. Yes, AWS Budgets is what you want - docs.aws.amazon.com/cost-management/latest/userguide/budgets-managing-costs.html. Will be doing a video on it in future. You'll get an notification if you exceed your budget, which is a good idea because I've forgotten about some stuff and had to pay £35 😁
@@Jonathan.Davies Thank you, much apprec
nice video quality Jon. underrated channel in youtub'e shit algorithm
@eugeniosp3 haha cheers bro 👊
@@Jonathan.Davies hey i man i know this might be a pain in the ass but if u could add chapters that would be amazing. after watching 4-5 of thes tutorials i just want to skip to the parts i need. just $0.02
@eugeniosp3 yeah that’s fair enough, will leave more detailed chapters in future vids 👍
Great work! Thank you.
Thanks Alex 🤙🏻
Thanks for the super helpful introduction! I have a question: How do you get your local copy updated if you make a change in the AWS console UI? E.g. someone just made a "quick fix", is there a resync operation or pull from AWS?
Actually further to my first question -- is there a way to capture the metadata you set up in the AWS console (e.g. permissions, triggers) back into the local yaml (I assume that's where the permissions and triggers would go)?
Thanks for the great video! This is very helpful... but I do have one question I couldn't find an answer to, and I'll be happy to see a video that covers it: Is it possible to create multiple lambda functions within the same project (and deploy them)? If so - how? I have an API with multiple endpoints, and it does not make sense to create a new project for each endpoint... or is it?
Thanks for watching Doron. You can create multiple lambdas in the same project by just defining as many AWS::Serverless::Function's as you need in the template.yml (and making sure there is a corresponding codeUri link to to the code for the new lambda - the original function's code lives in hello-world/, you'd need to create ... - for example - ... hello-world-1/ and write the Lambda code in there ). This would allow you to have multiple lambdas in same project and deploy them. As for the multiple endpoints and multiple projects, without seeing your API or knowing your requirements, I'd agree that you don't need multiple projects. My HTTP API video (ua-cam.com/video/7u1p5dieIh8/v-deo.html) shows how you can have an API with multiple endpoints but this is only backed by one lambda. Will try and touch on this in more detail in future video 👍
how can i send a request to this from postman? the request doesnt return anything
Great job man👍
Thank you Vinson 👍
Thanks. I have a question about how the template.yaml configuration would be if instead of using api gateway use alb ?
No worries Arley. Alb isn't supported as an Event Source under SAM (docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-eventsource.html), you'll most likely need CloudFormation. People have been asking for the same thing here though - github.com/aws/serverless-application-model/issues/721, so maybe we will see it in a future release. Thanks for watching
nice tutorial. much appreciated. do I need to delete everything to prevent any charges?
Thanks Wes. Yes I'd clean it up once you're finished 👍
what glasses are you wearing Jonathan? They look nice.
They are some Ray Ban frames. I'd defo recommend
Great video!!
Questions:
1) I want to implement least privilege and am currently adding the permissions one by one according to the CloudFormation error logs outlining whatever permissions are still missing. Is there a way to figure out which permissions are required to deploy this CloudFormation stack (i.e., sam for lambda)?
2) The "outputs" section of template.yaml states that an API gateway endpoint will be created along with the Lambda instance and IAM role. Is it possible to change the default outputs, say, not creating an API Gateway endpoint since I want to invoke Lambda using the functional URL instead of the API Gateway?
Thanks Kristen.
1) The SAM CLI prompt to create the IAM role during deployment etc doesn't create anything extraneous but if you are taking extra effort to understand least privilege, this is probably your best approach to know exactly what's going on under the hood.
2) Yes, if you remove the API Gateway section and add a FunctionURLConfig under the function definition in the template.yml - you can then reference the FunctionURL in the outputs section. See this link for examples of both: docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-functionurlconfig.html
It took me a while to figure out on adding policies one by one by checking the clod formation error logs, I was scraching my head
Wonder why we have no new videos
Wow!!
Thanks bro ❤
No worries Dhanushka 🤙
New sub here. Could you cover grabbing data from an http site then bringing it in through lambda into an S3 bucket? (I’m thinking metrics from a site like Prometheus)
Thanks for subbing and commenting Nate. I've got a video on API Gateway coming soon - part of that shows how you can inject a http request into the event that your Lambda receives (which could apply to part of your scenario). Either way - sounds like a good idea. I'll look into it
@@Jonathan.Davies Love it. See you there
Can we run locally without docker?
My worry is this is extra steps that the cicd pipeline should take care of.
4:05
5:15