Building a Serverless application using a framework like SAM often comes with a file called template.yml, through which you define the function configurations and architecture programmatically.
As an application grows, its configuration file becomes more and more complex to handle. AWS has set up a service that helps to build Serverless applications rapidly called AWS Application Composer.
The YouTube Channels in both English (En) and French (Fr) are now accessible, feel free to subscribe by clicking here.
What is AWS Application Composer?
AWS Application Composer is an AWS visual design tool that accelerates architecture definition and configuration for Serverless applications using the drag-and-drop way, an IaC (Infrastructure as Code) service that provides streamlined configurations for Serverless applications following AWS best practices.
Open AWS console -> AWS Application Composer.
The picture above corresponds to the home page of Application Composer. It offers 3 starting points for its usage.
- Open a demo project
- Create a new blank project
- Load a CloudFormation template
To get more about it, let's start from scratch by selecting Create a new blank project as illustrated in the following screenshot:
In the following list, points 3 and 4 are related to the method of saving changes:
1- New blank project: It starts a project from scratch.
2- Load existing project: To open existing project template (template.yml by default) in AWS Application Composer.
3- Connected: It means as you make changes, these are automatically and simultaneously saved in a local file you provided.
4- Unconnected: Here, the changes will only be saved when you manually request them.
Once clicked on the Create button, you are now redirected to the main interface of Composer, through which you can build an application:
Let's take a look at the sections highlighted above:
- Section 1: It consists of 2 parts; Resources and List which contain respectively the list of available AWS resources that you can drag and drop in the Canvas tab and the list of resources used or present in Canvas already.
- Section 2: It represents the workspace where we drop resources that we plan to use (Canvas tab) and get the corresponding code generated in the Template tab.
- Section 3: The place to configure the resources present in the Canvas tab.
- Section 4: This area represents the toolbar, where we find the mode used and the contextual menu.
In the demo below, we will set up a Lambda function wired with API Gateway and DynamoDB services;
In the end, we have a sample SAM application whose source code is available on GitHub.
The builder (Canvas tab) looks like the following:
For the deployment, we used the following commands:
- sam build
- sam deploy --guided
You can take a look at the README to grab more about it.
We have just started our journey to build a network of professionals to grow even more our free knowledge-sharing community that’ll give you a chance to learn interesting things about topics like cloud computing, software development, and software architectures while keeping the door open to more opportunities.
Does this speak to you? If YES, feel free to Join our Discord Server to stay in touch with the community and be part of independently organized events.
To summarize, it becomes easier to build the architecture of any Serverless application, and we hope we have satisfied your thirst for knowledge about AWS Application Composer!
So, what do you think about AWS Application Composer? Let us know in the comments section below.
Thanks for reading this article, do recommend and share if you enjoyed it. Follow us on Facebook, Twitter, and LinkedIn for more content.