While I haven’t done too much with Serverless Framework and Functions as a Service (Faas) recently, I did in the past and it isn’t something that I’ve forgotten. In the past I demonstrated how to deploy Node.js functions to Amazon Web Services (AWS) Lambda that contain native dependencies. While not a necessity for all Lambda functions, it is for functions that use libraries for specific operating systems and architectures. For example, my previous article titled, Use AWS Lambda and API Gateway with Node.js and Couchbase NoSQL, fell into this situation. Making use of an EC2 instance or a Docker container with Amazon Linux will help most of the time, but there are scenarios where a little bit extra must be done to accomplish the task.
In certain circumstances everything may package and deploy correctly, but still throw errors. For example, a common error is around libstdc++ and a version of GLIBCXX not being found.
In this tutorial we’re going to see how to resolve library errors that might not be caught in a typical packaging and deployment scenario with Serverless Framework and AWS Lambda.Read More
I am pleased to announce that the latest episode of The Polyglot Developer Podcast is now available for download. The episode titled, Going FaaS on Serverless with OpenWhisk focuses on the development and deployment of functions to be deployed on a serverless cloud platform.
In this episode I’m joined by Carlos Santana who is part of the Cloud Functions team at IBM. While Apache OpenWhisk will have an emphasis in this episode, other cloud services are mentioned as well, including AWS Lambda and Azure Functions.Read More
I was recently working on a Functions as a Service (FaaS) project using AWS Lambda and Node.js. However, I was running into an issue where my package dependencies found in my node_modules directory were for the wrong platform once deployed to Lambda. This is not the first time I experienced a problem like this. I knew the issue straight away because I encountered the same thing when trying to use a node_modules directory generated on Mac from a Windows computer.
When uploading a package developed with Node.js to AWS Lambda, the package.json file is not considered. Instead you are uploading a package that contains the node_modules directory and all dependencies. So how do you develop for AWS Lambda from Mac and Windows, but have it work once deployed?
We’re going to see how to use Docker to get our Node.js FaaS project dependencies designed for Amazon’s flavor of Linux.Read More
Not too long ago I had written about creating an API with Node.js and Express that accepted image uploads and manipulated the images to be Android compliant before returning them in a ZIP archive. This article was titled, Create an Android Launcher Icon Generator RESTful API with Node.js, and Jimp, and it was a great example of creating APIs that that did most of their work in memory. I even demonstrated how to containerize the application with Docker.
Applications that manipulate media will need to be able to scale, otherwise there is a risk of the application crashing from not enough resources, or too many resources can get expensive. For this reason, it makes perfect sense to take the previous example serverless with Amazon’s Lambda and API Gateway offerings.
We’re going to see how to use API Gateway to accept HTTP requests with binary image data and process that data with Lambda to return various sized Android launcher images packaged in a ZIP archive.Read More