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:
- AWS is confusing for developers without deep experience in low-level cloud technologies.
- Businesses have to pay a hefty amount to get technical support from AWS.
- AWS Pricing is fiendishly complex and difficult to predict. Also, it doesn't allow you to set a hard spending limit.
- Need a credit card to sign-up.
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.
Pros of Nimbella over AWS
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.
Try Nimbella's platform with a real example
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
- Approve/Reject invoices
- Adding new invoices
- Exporting invoices
Basic architecture on Nimbella
Directory Structure on Nimbella:
Port your AWS Lambda functions to Nimbella
The following step-by-step guide will easily allow you to move your Lambda Functions to Nimbella.
1. Accounts creation and configuration
- Nimbella: Create a new Nimbella Account and it gets activated without providing any card details.
2. Install & Set-up CLI
Let's install CLI to deploy and interact with the cloud platform through the terminal.
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
3. Set-up 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>
4. Create Your API for Invoice Processor
- Create a directory named "packages" which wraps the back-end code.
- Create a new directory that represents the app name inside packages.
- Create a new directory name that represents the API endpoint. Please note that in Nimbella each directory name represents API endpoints. Hence, create the directory how you want to name the API endpoints.
- Initiate a node js project with nim init -y
- Install nim-sdk package to access Nimbella's Redis.
Once done, we can read our invoice data from Nimbella's Redis with the below code.
Create a project.yml file and specify our directory structure (http end-points) of our function as below.
Our Serverless function can be deployed by running the below-given command in Nim-CLI.
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):
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
- Approve/Reject Invoices
- Export Approved/Rejected/Pending invoices (using jsPdf)
- Add new invoices.
Our React App can be hosted on Nimbella by following simple steps:
- Create a build.sh file and specify the commands to create a build from React Ap
- Create a .include file and specify the file to be included for deployment
- Configure project.yml for hosting our front-end as below.
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:
- Wrap the AWS-Lambda's functions inside the directory named "packages".
- Wrap the front-end code inside the directory named "web".
- Create a project.yml file and specify the configuration of the serverless function.
- Deploy it to Nimbella using Nimbella's deploy command.
Benefits of Nimbella over AWS-lambda limitations
- Nimbella provides a better developer experience by letting developers focus and invest time on App logic by removing architectural complexity.
- Nimbella supports multi-cloud deployment. Serverless Apps built on Nimbella can be deployed into your choice of cloud provider at any time.
- Nimbella provides integrated monitoring and logging to conveniently access logs and statistics from the terminal. Logging is more centralized and the output of the function won't be feeling disjointed anymore since Logging can be accessed with Nimbella's CLI instead of heading to CloudWatch in AWS.
- Our smart CLI builds the artifacts to be deployed dynamically from the project's configuration file, unlike AWS Lambda where we zip the dependencies for deployment.
- Vendor lock-in is avoided with our multi-cloud deployment feature.
- Nimbella lets developers feel themselves developing the end-to-end application by providing a way to deploy front-end (UI) and back-end (API) as a single deployment.
- Nimbella cloud platform is built on an open-source, Apache OpenWhisk. Hence it provides more data security and access control.
- No card details are required. Start with a generous free tier and grow with us.
- Nimbella offers dedicated secure domain, certificate management, CDN, and much more with ease.
- There is no development effort when you switch between cloud providers.
- The learning curve with Nimbella is very simple. You won't be amused with the 'n' number of services like AWS.
- Native support for state with in-memory high-performance data storage(Redis).
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
Athithan started his career with Cognizant and experienced himself in the testing field primarily. Later he started getting involved in different fields like Development, Security, Content writing, etc. He now works with a reputed organization as a Software Development Engineer in Test where he is responsible for the product quality through Automation.
Follow him on Twitter: @raj_athithan
- How to Migrate from Containers to Nimbella Serverless Architecture
- Kubernetes in simple words: explained by Eric Swildens
- How to optimize Kubernetes costs with Nimbella
- Step by step guide on how to port from AWS to Nimbella
- How to build and improve your serverless APIs
- Simplifying Kubernetes For Developers
- FaaS Wars Season 2 - Step By Step Instructions
- What is Nimbella and what does it offer?
- Results and Feedback of FaaS Wars - May the FaaS Be with You!
- 28 Serverless Gurus and experts One Must Follow in 2021
- The Faas Wars Alert!
- CI/CD pipeline with GitHub Actions
- How to deploy Node.js functions on Nimbella
- Kick-Start Your Serverless Journey
- AWS re:Invent Serverless Highlights
- Opportunities in the Wake of the AWS Juggernaut
- FaaS Wars: Serverless & Virtual Robot Competition
- #DeveloperIPL Online Hackathon Results & Feedback on Nimbella's Integration for Postman
- How to connect to the 3rd party database such as MySQL at Nimbella (example in Java)
- What can you do with the Nimbella Workbench?
- Deploy your Shopify Storefront to Nimbella
- Not All Serverless Platforms Are Created Equal
- Nimbella + Netlify: Uplevel Your Development Speed
- How we learned to Jamstack, Our Caputron Story.
- Commander for Microsoft Teams - Your Custom Bot that runs on your Command!
- How to Build a Stateful Cloud App on Nimbella vs. AWS
- Starter Kit and Resources to Build a Serverless Cloud Application
- How to Build Serverless Slack Apps and Commands
- How to Set up your Serverless Environment and Get Started in Less than 2 Minutes!
- How to Quickly Deploy Stateful Serverless Apps with Nimbella?
- What is Serverless Computing? 3 reasons to start now
- How to Build a Serverless Slack App in Minutes.
- How to Manage your Netlify Website from Slack?
- How to Build a Serverless Slack Command in minutes
- How to Build a Stateful Serverless Cloud Web Application?
- How to Create an Optical Character Recognition (OCR) Application?
- Development at the Speed of Innovation – Nimbella, the Serverless Cloud
- Software Security Features on Enterprise Serverless Slack Apps Enabled by Nimbella Commander
- Coronathon India’s first demo day has 18 projects to help fight COVID-19
- See the time in different cities on Slack with Nimbella Commander
- Greet your friends in their native language in Slack with Nimbella Commander
- Install Commander on your Mattermost Instance
- How to Fetch your Digital Ocean Billing Info on Slack?
- How to Stay Updated with Coronavirus Statistics on Slack?
- Create BlueJeans meetings on Mattermost using Commander
- How to Fetch your AWS Billing Info on Slack?
- Get your Datadog billing info in Slack with Nimbella Commander
- Serverless Slack Apps and Slash Commands
- How to use Slack Effectively with Nimbella Commander?
- How to Create a multi-user Chatroom Hosted on Serverless Cloud?
- Using Docker actions, running Golang, and other fun things with OpenWhisk
- The duality between serverless functions and APIs
- Serverless HTTP handlers with OpenWhisk
- Serverless functions in your favorite language with OpenWhisk
- Run Swiftly: precompiled Swift actions
- Performance debugging for serverless functions using the Cloud Shell
- Locally debugging OpenWhisk actions
- Composing functions into applications
- A Serverless Composition of Functions
- The Serverless Contract
- The dawn of the Cloud Computer
- Security and Serverless Functions