Once upon a time, not so long ago, a word caught my ear. Lambda. That struck a chord, remembering the good old days of playing Half-Life as a kid. ...
For further actions, you may consider blocking this person and/or reporting abuse
Nice one, Adnan. I'm bookmarking this article.
It would be interesting to know about a couple more things:
Thanks! Glad you're interested in learning more.
/tmp
dir where you can write to disk, but you seriously do not want to.Hope this clears things up. :)
Awesome, thank you! :D
Great Adnan...Clear Explanation on what to do with AWS Lamdba...one question , is that possible to stop the api gateway which we created for roll-a-dice temporarily, if so how could I do it?....
Do we need to include the node_modules folder when we upload the zip to lambda?
You can't "stop" the API Gateway entirely, but you can add an API Key to rate-limit the endpoint.
Yes, you need to include the
node_modules
. I tend to write Lambda code locally and use the Serverless Framework to deploy the code and resources. Check out this article I wrote to learn how.Thats a very nice article Adnan. I'm looking to find a way to write Lambda code in local IDE so that I can have version control. Any suggestions?
I use VSCode and the Serverless Framework to manage my resources and code. Check out this article I wrote to learn how.
The upload zip instructions don't make sense. If I run mkdir roll-a-dice && npm init -y then the node_modules directory will be outside my project directory and will not be include in the zip.
Oh, that's a typo. Thanks for noticing Dan! I've fixed it now.
great explanation!!! :D
Glad you liked it!
Hi Adnan,
Can you tell me how to host nuxt js server in lambda?
That's actually a great question. I haven't tried it yet, but I'd say it's better to use
nuxt generate
and host static content on S3. If you get around to trying it, feel free to get in touch with me!Awesome article, thanks for writing! I've been trying to learn AWS lambda recently, but I find the official docs rather confusing, this article helped a lot!
Glad it helped! I can understand the pain of reading the AWS docs. They are surprisingly bad for such a huge provider.
Nice article. It would also be interesting to talk about receiving input to the lambda handler. I see the event argument is passed into the function but it's never used.
Thanks! :)
Here's another article I wrote a while back.
A crash course on securing Serverless APIs with JSON web tokens
Adnan Rahić
It's a bit more detailed, with examples of receiving input. :)
I assumed you wanted us to cd into 'roll-a-dice' directory and do an 'npm install moment --save' (for the uploading zip folder part).
adnan excelente articulo lo lei y me quedo mucho mas claro aws lambda si tubiera mas informacion y la puedes compartir seria de gran utilidad
saludos