Your First AWS Lambda Function with Go
ฝัง
- เผยแพร่เมื่อ 28 มี.ค. 2022
- Learn how to build your first Lambda Function with Go! We'll create a basic hello-world function from scratch, upload it to AWS, and test it within our browser. This is the first in a series of videos on building a Serverless API in AWS with Go!
▪ Website Link: brianmorrison.me/blog/your-fi...
🔴 Subscribe today!
/ @brianmmdev
👋 Connect w/me:
▪ Twitter: / brianmmdev
▪ Website: brianmorrison.me
▪ Twitch: / brianmmdev
__________________________________________
🖥 My Rig
▪ CoolerMaster MB511: amzn.to/2AZfPUc
▪ GIGABYTE X570 AORUS Elite Wifi: amzn.to/2AZijlt
▪ Sabrent 1TB Rocket: amzn.to/316zIDy
▪ Corsair Vengeance RGB Pro 64GB: amzn.to/3epbybf
▪ AMD Ryzen 9 3900X: amzn.to/2CxwYov
▪ ASUS ROG STRIX GeForce GTX 1080: amzn.to/3hYuEar
__________________________________________
🎥 Streaming Gear
▪ SteelSeries Arctis 7: amzn.to/3hOUpJX
▪ Elgato Game Capture HD60 Pro: amzn.to/2V8nTc8
▪ Logitech C922x Pro Stream: amzn.to/2V7PKZY
▪ TaoTronics Camera Light: amzn.to/37QI4Ax
▪ InnoGear Microphone Arm: amzn.to/37Ql8Bk
▪ Audio-Technica AT2005USB: amzn.to/3ajIuRh
__________________________________________
⏯ My Coding Series'
▪ Coding NodeJS APIs: • Coding NodeJS APIs
▪ Coding Discord Bots: • Coding Discord Bots
__________________________________________
📚 Other Excellent Learning Resources
▪ freeCodeCamp: www.freecodecamp.org/
Please note that links in this description may or may not be affiliate links, where I make a small commission if used.
Thanks For Watching! - วิทยาศาสตร์และเทคโนโลยี
Just as a note in 7:51 the runtime handler is not the name of the function entry point, but the name of the executable generated by go build command. For example if you run "go build something" the runtime handler must be "something".
Your series is easily the best guide for aws lambda dn cognito usage. You talk clearly and detailed. Your tutorials are also very fast which helps a lot.
Thank you! I was trying to run my lambda but I gave some errors, this video helped me a lot!
good video, quick to the point. Thanks!
Glad it was helpful!
Good stuff Brian!
Appreciate it!!!
Thanks bro..this video help me very much
Great video, keep up the good work ✨🎉
Thank you so much!
Thanks your work very much. ❤️
You're welcome 😊
Such a great channel ! Thanks for the video
Could you make one for AWS gateway proxy with gin ? Couldn't find an updated one
I followed your tutorial except the AWS console part. I just used Terraform since I very much dislike point and click lol. Great video though!!!
Glad it helped
While Test the file it shows calling the invoke Api action failed with signature expaired
Hey there!
When I try to run my program locally, I get the following error: expected AWS Lambda environment variables [_LAMBDA_SERVER_PORT AWS_LAMBDA_RUNTIME_API] are not defined.
I find this weird since the AWS Lambda documentation does not mention any env variables with these names, nor mentions this configuration step at any point.
I already tried googling for it but I got no answers.
Do you know if there's something I'm missing?
Thanks in advance!
That is strange... honestly to do local testing, I use AWS SAM which kinda takes care of that logic. You might find some answers here: docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/welcome.html
the handler name is the file name, not the function name like u mentioned in 8:00
exactly it's the binary file name generated from the build command I believe. But anyway thanks a lot @Brian you helped me to create my first lambda function.
Hey I couldn't find the Go in supported languages list. How can I find go in that list. there are Java, Node.js and Python versions. Please help me
go it.. it's listed as OS-only runtimes
How can I pass parameters such as bucket name, path etc
If you're using an S3 event, you'd want to replace the event param with `s3Event events.S3Event`.
I do this in my side project, you can see more here: github.com/GuardianForge/guardianforge.net/blob/0f6b41f1bcf28830557510496f8d3ea19939d06e/backend/stack/s3-handlers/create-og-image/main.go#L52C35-L52C57
@BrianMorrison Lambda "Test" returned "fork/exec /var/task/main: exec format error: PathError null" when I built with v1.17 or v1.20. Log Events said "INIT_START Runtime Version: go:1.v15". OK I understand that, but..
How are you using v1.17 under Lambda in 2022, when in 2023 the steps in the video cause AWS to look for v1.15? Did you also customize something in Lambda (allowing 1.17) which wasn't covered here?
Nothing funny going on that wasn't covered. Maybe it's a regional thing? What region are you trying to deploy to?
same with me . Did u find any solution?
Let me know if u know solution for this error
This problem is because in 7:51 he says that the handler name should be the name of the function entry point "main", but in reality it is the name of the executable generated after the go build process.
For example if you create a go project named "lambda-something" and inside it you run "go build" the executable name is "lambda-something" so that is the name you should put in the runtime handler not main.
I am facing en error on importing packages
What's the error?