39
Step by step guide on how to port from AWS to Nimbella
AWS is the largest public cloud provider - but that doesn't make it easy to use!
It can be challenging to work with because:
Giuseppe Miragliotta, Backend Software Engineer at Xtream
AWS Lambda’s pay-per-use pricing model is ideal for sporadic usages because you’re never paying for over-provisioned infrastructure. On the other end, costs can sum up rapidly on highly intensive workloads since these kinds of resources are expensive. Nimbella can help you save costs by using LaaS or CaaS services that are cheaper than FaaS, providing a proven and actively maintained architecture.
Backed by Apache OpenWhisk, an open-source serverless solution, Nimbella comes with a high degree of portability. This means that the cost of moving to another cloud provider is greatly reduced and a multi-cloud strategy is also feasible, letting you choose the best products that suit your needs.
All these urge many users to look for the best AWS alternative which eventually gets them away from AWS Cloud lock-in.
In this article, we shall walk you through how Nimbella can fill up the space of AWS Lambda as an alternative and how you can port your functions to Nimbella.
The developers using the Nimbella platform only have to code the logic and Nimbella handles the rest including storage management, capacity provisioning, auto-scaling, monitoring, and logging.
Let's create a new App and deploy it on Nimbella to get ourselves familiar with porting the functions from AWS-Lambda to Nimbella.
Please consider that we are going to create an invoice processing App with the below features
It will use React.js for the front-end and Node.js for the Back-end. For data storage, we can use Amazon's dynamo DB in AWS-lambda and Nimbella's Redis in Nimbella Platform.


The following step-by-step guide will easily allow you to move your Lambda Functions to Nimbella.
Nimbella's CLI can be installed by referring to this link for the respective Operating System.
To set up the CLI for Deployment and other activities we just need to log in to the CLI using the below command
nim auth login
Set-up Data Storage
Please consider that we are going to store our invoices as documents in the data storage.
Please consider that we are going to store our invoices as documents in the data storage.
Nimbella provides dedicated pre-integrated Redis key-value storage. We can directly use it as data storage without any configuration. We can do CRUD operation with our DB via CLI using the traditional Redis command as below.
nim kv set <keyName> <keyvalue>

Create Your API for Invoice Processor
nim project deploy <directory containing our proj>
Once deployed, we can get the API URL for the deployed function using the below command.
nim action get action <functionName>
Now, our API is ready to serve the requests seamlessly.
Deployed API URL (Nimbella):
Front-End
Let's create a React App by running the below command.
npx create-react-app <appName>
Once React App is created, we can implement the below features in the UI for the Invoice Processor in the usual React way as below.
Consume the API created in the previous step to render the invoices

Our React App can be hosted on Nimbella by following simple steps:
Directory of our Invoice Processor having the React App (front-end) & Serverless function (Back-end) looks as below.

We can deploy our Invoice Processor App by running the below command.
nim project deploy <projectDirectory>
Once completed the host URL of Invoice Processor can be found in CLI as below.

In Brief: Porting Aws-lambda to Nimbella:
Nimbella is a modern developer-friendly Serverless platform that empowers you to build and run serverless applications in the simplest way. When you look out for alternatives to AWS Lambda, Nimbella suits perfectly and you can port your functions to Nimbella without much effort.
Please feel free to check out the latest Forrester Report on why Nimbella has been named as a Strong Performer among multiple players in the serverless space. Nimbella is a rising new generation serverless platform that could be considered as a great alternative to AWS and other cloud providers.
Author details: Athithan Raj P
Follow him on Twitter: @raj_athithan
39