Migrating an Existing Express.js Based application to the Serverless Framework
AWS Lambda allows us to dramatically lower our costs for running an application. It’s fairly easy to convert an Express.js app into running in the serverless framework.
AWS Lambda allows us to dramatically lower our costs for running an application. It’s fairly easy to convert an Express.js app into running in the serverless framework.
I was recently working on a serverless api that uses serverless offline, express.js and mongodb.
We started getting emails from MongoDB Atlas telling us that we ran out of connections.
There are quite a few different reasons to consider using serverless instead of looking at building a monolith or building services in containers.
The Serverless Framework allows us to abstract away quite a bit of the complexity from setting up lambda functions and the necessary events to execute them, especially through the API gateway.
In this blog post we look at how to set up a simple project to use the serverless framework.
The Serverless Framework is a free open source framework that allows us to easily build applications on cloud providers like AWS using serverless computing.
As you may remember, it needs to be installed globally which means we need to do the update globally and we’ll need to potentially update all of our projects for any breaking changes.
Developing locally makes a lot more sense than deploying to a dev environment consistently because it helps save time, save some cloud costs, and avoids obvious embarrassment. 🙂
When trying to invoke any of your lambda functions if you are getting an error that says “lambda is not a function” the problem is likely that the handler is misspelled in the serverless.yml file OR you aren’t exporting modules.exports.handler and are instead exporting something else.
The serverless default for CloudWatch Logs is to keep the logs forever. CloudWatch Logs are pretty expensive to keep around indefinitely. In the serverless.yml file, we’re able to set how long the cloudwatch logs are kept for. I recommend keeping them for at least 7 days but 30 days is probably more ideal.
In the ten years or so that I have been programming professionally, there’s been significant changes to the way we did things whether it be the way we developed software, the way we managed software, or the environments we used to execute our code. Over time, these changes have become increasingly more and more dramatic to the point where it’s now possible to run a company and maintain almost no actual servers.
For the last 18 months or so, I have been working with “serverless computing” which is an incredibly encompassing buzzword for a lot of different technologies and techniques.
Serverless computing is a very large break from the traditional way we developed software and deployed software to servers. Serverless computing is basically an architecture where code is stored and executed by a fully managed provider.…
The Serverless Framework is a free open source framework that allows us to easily build applications on cloud providers like AWS using serverless computing. By utilizing Serverless development and IT operations teams are able to quickly build functions and the events that will trigger them.
onnecting the Serverless Framework to AWS is pretty painless once we have downloaded our credentials from AWS.
In this blog post, we’ll touch on how to get our AWS API credentials, configure serverless and set up a project for it.