# Installation

Kumologica Designer is available as a native app for Mac, Windows and Linux operating system.

To get the latest version of Kumologica Designer, visit the download page and select your platform.

# Prerequisites

The following are prerequisites for Kumologica Designer to work properly:

# Configuring AWS

Kumologica Designer aims to make the developer experience as productive and enjoyable as possible, as such it requires extra permissions to build and deploy into your cloud.

You have two options, either running Kumologica as an admin user or custom user with least privileges.

# a) Running as admin user

This is the best option for starters to get going quickly. You only have to make sure your IAM user linked to your local profile has admin policy (AdministratorAccess).

Run this script and the following resources will be created:

  • KumologicaDesignerPolicy: Including only (least privilege) the permissions required for Kumologica Designer.
  • KumologicaDesignersGroup: An IAM User Group that has the policy assigned.

So the only task left to you is to include an IAM user into the newly created IAM User Group KumologicaDesignersGroup.

# Build your first API flow

This is a 5 minutes tutorial were will we will be creating and deploying a HelloWorld API using Kumologica into your AWS account.

Link to video

# Instructions

  1. Click on Home and select Create New Project on the Kumologica popup.

  2. Provide the Project Name and Choose the location to save the file.

  3. Click Create.

    Now you should be seeing an workspace grid to build your flow with a default flow having an EventListener , logger and EventListener End node.

  4. Double click the EventListener to open the editor and and you can see the Amazon API gateway selected from the drop down with the verb set as GET and url path as /hello . Click Close

  5. Double click the logger node and you can see the log level set as INFO and Message set as Test log. Click Close

  6. Double click the EventListener End node and you can see the payload is set as and status code set as 200.

    {
      "hello": "world"
    }
    

Your flow is now ready for deployment.

firstflow
  1. On the right hand side of the designer panel click on the aws icon. And select the AWS profile from the drop down that you have already configured as per Installation step.

TIP

Leave Name, Description, Memory, Timeout, Res. Concurrency, Active X-ray as default for this tutorial.

  1. On the same panel at the bottom , Go to triggers section and select Amazon API Gateway and click the Add Event button.

  2. Now you could see three fields to be filled i.e API , Deployment Stage and Security Type.

    • For the API select Create new API .
    • For the Deployment Stage type as dev.
    • For the Security type as NONE
  3. Now lets deploy the flow by clicking on the Deploy button.

  4. Now if you click on the OUTPUT console you could see the lambda getting build and deployed with API gateway trigger successfully binded.

  5. From the console copy the URL and invoke the endpoint using postman or any other client of your choice. The endpoint will look like this:

https://<gatewayid>.execute-api.ap-southeast-2.amazonaws.com/dev/
  1. You should see the following as the response with 200 as the http status.
{
  "hello": "world"
}

# Build your Second API flow

This is a 10 minutes tutorial were we will be creating a Contacts API implementation which will store records in AWS DynamoDB.

Link to video

# Instructions

As a pre-requisite to this tutorial , lets create a DynamoDB table with the following columns.

  product_name
  qty
  product_id
  batch_date
  supplier

TIP

Click the below link to follow the steps in creating a dynamoDB table.
Create a dynamodb table

Once the table is created. Copy the table ARN and table name from the overview tab of your dynamodb products table. We will be using it soon for configuring the dynamodb node.

  1. Click on Home and select Create New Project on the Kumologica popup.

  2. Provide the Project Name and Choose the location to save the file.

  3. Click Create.

    Now you should be seeing an workspace grid to build your flow with a default flow having an EventListener , logger and EventListener End node.

  4. Double click the EventListener to open the editor and edit the verb and url path. Keep the Event Source as API Gateway.

Set the verb as POST and url as /products and Click Save

  1. From the pallette search for DynamoDB under AWS category. Drag the dynamodb node to the canvas. Double click the dynamoDB node to open the editor.

  2. Provide the Display name for your node as ProductStore. Provide the table name which we have copied on our earlier section as well as provide the table ARN which we have copied from earlier section.

  3. Click Add to add the columns defined in your dynamodb products table.

createcolumns
  1. Click Save.

  2. Wire the dynamodb node to EventListener.

  3. Add the EventListener End node from the AWS category and wire it to the Dynamodb node.

  4. Double click the EventListener End node and set the Status code as 201 and Payload as {"status" : "inserted"}.

  5. Click Save.

Your flow is now ready for deployment.

secondflow
  1. On the right hand side of the designer panel click on the aws icon. And select the AWS profile from the drop down that you have already configured as per Installation step. And set the Timeout as 30 seconds(default is 5 secs).

  2. On the same panel at the bottom , Go to triggers section and select Amazon API Gateway and click the Add Event button.

  3. Now you could see three fields to be filled i.e API , Deployment Stage and Security Type.

    • For the API select Create new API .
    • For the Deployment Stage type as dev.
    • For the Security type as NONE
  4. Now lets deploy the flow by clicking on the Deploy button. if you click on the OUTPUT console you could see the lambda getting build and deployed with API gateway trigger successfully binded.

  5. From the console copy the URL and invoke the endpoint using postman or any other client of your choice with the following payload.

{
  "product_name": "Apple",
  "qty": 3,
  "product_id": "454",
  "batch_date": "042020",
  "supplier": "XYZ.inc"
}
  1. You should be getting 201 status response with following payload. When you check the dynamodb products table you should see the record inserted. json { "status" : "inserted" }

    TIP

    You can download this tutorial from our repo link.
    Source code'