Serverless application development is one of the trending technologies these days. Thanks to the rapid contribution of the leading cloud service providers, the serverless concept has evolved with a strong base. Most of the enterprises take hand in hand with Serverless for better technological and business advancements.
Even though serverless computing has become a turning point of application development, serverless application development cycle has never been easy. But with Sigma IDE from SLAppForge, serverless application development has now become way easier. Sigma handles all the hard work! You don’t even have to log in to your cloud platform console or refer the provider’s documentation. Sigma will streamline the design, development and deployment of serverless applications. And lift the burdens of underlying platform-level complexities off the developers. You only have to focus on the implementation of the custom Lambda processing logic, workflow and business logic. So, in this article let's talk about how Sigma makes the developer’s experience better.
Setup and configuration
Sigma itself is truly serverless. It is a 100% browser-based application and does not require a dedicated server/VM/container to be running in the background. So the developer does not need to worry about installing, configuring or updating the environment. The version available on the cloud is always the latest!
You can create a new Sigma account with a few clicks. Or log in with your Google/Facebook account with even less hassle. To create a brand new Sigma account the only thing you need is a valid email address and a cloud service account. Sigma currently supports both AWS (Amazon Web Services) and GCP (Google Cloud Platform) as cloud providers. So, if you integrate Sigma with at least one provider, you are ready to go. Sigma directly interacts with and configures the serverless platform, using the credentials that you provide. Sigma can store provided AWS/GCP keys on your behalf so that you will not have to re-enter them at every log-in. Since Sigma encrypts your keys with your own password, you have nothing to worry about security aspects.
Let’s say that you lead a technical team and need to evaluate Sigma IDE before using it for actual development work. Sigma itself provides a Demo user with test AWS credentials, where you can experience basic features of the IDE even without registration.
Sigma allows you to open an existing Sigma-compatible project from your own GitHub/GitLab, BitBucket account, or from a public repository. Or else you can import a Serverless Framework project by providing the URL of serverless.yml file or its parent directory. Sigma also provides several sample projects published by SLAppForge, which you can try out right away. Or else, you can create a new project by providing an appropriate name, and region where you want to deploy your application. After project creation, you will be directly navigated to the IDE Editor view.
Sigma provides a clean editor environment with all the essentials at your fingertips. The IDE is designed to cater to both newbies and experienced users. Intuitive UI, aesthetic and minimalist design of Sigma IDE brings down complexity and learning curve to a minimum; even a novice user can easily get familiar with the IDE within minutes.
Project Info section of the editor will display Project details, code changes, build, and deployment details in one view. Event Log and the progress bars give real-time feedback on what's going on behind the scenes. Warnings and error messages may pop-up during problems; in plain language, precisely indicating the problems and constructively suggesting solutions.
Sigma’s rich code editor offers syntax highlighting, keyword suggestions, automatic code completion as well as automatic and manual code formatting. It even offers variable suggestions and SDK typings and method call suggestions for dependencies you have added to your project. For better user experience, Sigma also provides 2 colour themes (light and dark) to cater to the developer's preference and working environment.
When we are talking about serverless, there are a number of leading service providers around these technologies. Unlike most of the other development platforms, Sigma itself supports multiple cloud service providers with the intention of serving a vast community of developers. As I said at the beginning of this article, Sigma Supports both AWS and GCP as application deployment platforms. Once you have given your preferred platform provider at the start, if you require a service from the other provider(GCP if the current project was AWS, and vice versa), you can integrate it easily from the Editor view or Account Settings section whenever you want.
Coding and Resource management
Sigma allows both NodeJS and Python for writing serverless functions. To create a function you just have to pick the language and provide basic configuration details such as a name, runtime version, etc. via a simple dialog box. Sigma will instantly generate your new function, with a pre-populated handler snippet to quickly get started.
The editor’s Resource Pane offers
- AWS resources (e.g.: Cognito, DynamoDB, ElastiCache, Kinesis, RDS, S3, SQS, etc.)
- GCP resources (e.g.: HTTP Triggers, Cloud SQL, Cloud Storage, etc.)
- 3rd party API resources like Twitter and
- some handy utility function code snippets
In order to call any of these APIs, you just have to drag and drop the relevant resource into your code and enter a few configuration details in its Resource Configuration popup. As soon as you click the Inject button, Sigma will auto-generate the relevant SDK calls for you. All you have to do is to define the custom logic inside the callback functions of the generated code.
The same goes for event sources, more commonly known as triggers. Let's say you are using AWS resources and need to execute your Lambda function with an API trigger. To do that, you have to configure API Gateway as the input trigger for the relevant Lambda function. For doing this in Sigma, you just have to drag the API Gateway from the resource pane and drop it on to the event variable (which is highlighted in red) of the handler method declaration. Once you drop your API Gateway resource you should get a pop-up view to configure your API Gateway API to access your application. Once you complete the configuration, click on Inject button. The event variable will now become highlighted in green, indicating a successful configuration.
When you drag and drop a resource to the code, Sigma will give you two options. You could either select an existing pool, topic, bucket or whatever relevant resource via the drop-down list or create a new one so that Sigma would create it as part of the project deployment. If you expand the relevant resources list from the resource pane, you can see an entry with the defined resource name. For example, in the above case, in resource pane under API Gateway you can see the previously created API. You can just drag and drop it onto the event variable of another function, and you will see that the API is listed under the existing APIs and it has been automatically selected as well.
Sigma will keep track of the new resources that you have added in this manner. And generate all necessary configurations and populate them seamlessly into your cloud platform when you deploy your project. No more lengthy CloudFormation or serverless.yml configurations, infrastructure-as-code (IaC) documentation look-ups, or endless frustration over why your handwritten yet perfect-looking deployment configuration did not work - probably due to a single typo.
If you click icon next to a function handler, you can reopen the configuration popup and update your API configs; or click the Remove button, which will remove your trigger from the Lambda.
Resources removed in this manner will appear in the Unused Resources section in the toolbar; and Sigma will intelligently exclude them from the future deployment of your project.
Whenever you drag and drop a resource to the code editor, Sigma automatically imports required AWS/GCP modules and libraries and creates instances of respective SDK clients. If you need to add any other third-party dependencies, you can simply use the in-built dependency manager of Sigma IDE. You can easily add dependencies by clicking on the small plus button in the left corner of the header toolbar. Once you click on that button you will get an option to search for your package, and then you can add it as required.
Based on the code you develop, Sigma will automatically generate the required execution permissions for the Lambda and assign it with an IAM role with those permissions. You can also customize permissions of your functions. Thanks to this flexibility, developers can use any resources/services in their code - even those which are yet natively not supported by Sigma itself. So, there's nothing to worry if your favourite resource is not included in Sigma’s Resource pane!
Testing and debugging
Sigma supports in-IDE real-time testing, along with real-time log tailing (SigmaTrail). At its first launch, Sigma will deploy a separate test environment, exclusively for testing purposes of your projects. There you can test your Lambda function before doing an actual production deployment. You just have to create a test event and invoke the respective lambda function with it; Sigma will display the execution result and logs right away, right within your browser.
As always, after deploying your application, you can directly test your serverless application endpoints and URLs by sending requests with Sigma’s in-built Toolbox, which offers HTTP, SQS, and SNS clients.
Version Control System (VCS) integration
Sigma is tightly integrated with GitHub, GitLab, and BitBucket, two of the most popular web-based hosting services for version control using Git. Sigma is created in a way, that even a user who has zero knowledge in Git can easily use the VCS. You just have to click the desired VCS integration button. And Sigma will integrate the IDE with your preferred version control system. Then you can directly commit your project to GitHub/GitLab/BitBucket - simply in a few mouse clicks.
Commit, Build, Deploy
Once you complete the dev work, it's time to deploy! On the toolbar, you can see 3 buttons as Save, Build and Deploy. You can click them respectively, or - much faster - just click the Deploy button which still cycles through the commit and build phases before moving on with the deployment.
Let's say you are deploying your application for the first time and you have clicked the Deploy button. If you have unsaved changes, Sigma will display the commit dialog box. So you can commit your last edited changes in a few clicks. Then the build will automatically start, which will convert your project into a deployable artifact. Once the build is completed Sigma will show you a list of changes, which are yet to be executed on your AWS/GCP account.
Once you review these changes and click the Execute button, Sigma will start to push the changes to your cloud account. You can view a detailed log of actions while the deployment is being executed. The deployment process will create all the required resources on the AWS/GCP side and configure all the required permissions and roles for your function execution. You can also abort the deployment process while it is going on. In this case, all the changes will be rolled back.
Once Sigma completes the deployment, it will show you a summary of the process. That summary also includes publicly accessible URLs, IDs, ARNs, etc. of the deployed resources. The Project Info section will also be updated with the build artifact URL and application deployment URLs.
After you have done a “full” deployment in this manner, you can keep on working on your project. As long as you only have code-level changes, you can use the Quick Deploy button on the toolbar to instantly publish the code updates. Even if you make other changes, like adding a new cloud service entity, you can run one deployment cycle (“update”) to sync that resource - and continue to use the Quick Deploy to sync the subsequent code-level updates.
Sigma has an In-built monitoring utility named SigmaDash, which is dedicatedly built to keep an eye on your Lambda functions. SigmaDash enables real-time monitoring, as well as real-time log tailing with SigmaTrail. You can monitor your functions individually, or collectively as a project - either hand-picked or imported directly from CloudFormation. SigmaDash also provides statistical graphical representations for invocations, invocation duration, memory usage, errors, cost incurred by your functions, and invocation throttles.
There are a number of serverless development tools and frameworks in the serverless industry. Each and every tool make their contribution in different scales and different perspectives. In SLAppForge Sigma, one of the key values is to provide better user experience to the developers and make serverless development much easier. While using Sigma, developers don't have to worry about underlying platform and service configurations, resource management, permission management, build, and deployments of serverless functions. Sigma does all of that for you, providing a hassle-free serverless application development experience. So, go serverless today, and Sigma will accelerate your journey like never before!