DEV Community

Cover image for Managing low-code environments with AWS CloudFormation and Azure Resource Manager
Audacia
Audacia

Posted on

Managing low-code environments with AWS CloudFormation and Azure Resource Manager

Low-code platforms have become increasingly popular in recent years as a way to speed up the development of business-critical applications and automate processes. However, managing the infrastructure of these applications can still be a complex and time-consuming task, especially in large-scale development environments. This is where Infrastructure as Code (IaC) tools such as AWS CloudFormation and Azure Resource Manager can be useful.

At Audacia, we have used Infrastructure as Code to remove the time-consuming process of managing and provisioning infrastructure. Across our projects, Audacia has always used Terraform, a declarative IaC tool created by HashiCorp, for this process. Nonetheless, we are always looking for new tools so that we can continuously improve our DevOps reliability and release with greater confidence. 

This article will explore how low-code platforms can be integrated with AWS CloudFormation and Azure Resource Manager to automate the deployment and management of low-code environments. 

We will discuss the benefits of these tools and provide examples of how they can be used to manage common low-code development scenarios.

Benefits of using IaC tools with low-code platforms

There are many benefits of using IaC tools with low-code platforms. 

  • Scalability: IaC tools allow you to easily scale up or down the infrastructure required by your low-code applications. This can ensure that you have the right resources available when you need them.
  • Reliability: These tools automate the process of provisioning and configuring resources. Automating these processes reduces the risk of human error and ensures that your low-code environments are always in a consistent state.
  • Security: You can enforce security best practices, such as encrypting and securing access to resources, to ensure low-code environments are secure.

Using AWS CloudFormation with low-code platforms

AWS CloudFormation is an IaC service that allows developers to provision and manage resources in the AWS cloud. CloudFormation can be used to create and manage a collection of AWS resources, such as EC2 instances, RDS databases, and S3 buckets, that make up your low-code environment.

The first step of using CloudFormation with a low-code platform is to create a template that defines the resources that make up the environment. This template can be written in YAML or JSON and can include parameters, mappings, and conditionals to allow for more complex environments.

Here is an example of a CloudFormation template that creates an EC2 instance and an RDS database for a low-code environment:

{
  "Resources": {
    "EC2Instance": {
      "Type": "AWS::EC2::Instance",
      "Properties": {
        "InstanceType": "t2.micro",
        "ImageId": "ami-0323c3dd2da7fb37d",
        "KeyName": "myKey",
        "UserData": {
          "Fn::Base64": {
            "Fn::Join": [
              "",
              [
                "#!/bin/bash\n",
                "echo \"Hello, World!\" > index.html\n",
                "nohup python -m SimpleHTTPServer 80 &\n"
              ]
            ]
          }
        }
      }
    },
    "RDSInstance": {
      "Type": "AWS::RDS::DBInstance",
      "Properties": {
        "DBName": "mydb",
        "Engine": "MySQL",
        "MasterUsername": "admin",
        "MasterUserPassword": "password",
        "AllocatedStorage": "5",
        "VPCSecurityGroups": [
          { "Fn::ImportValue" : { "Fn::Sub" : "${NetworkStackName}-SecurityGroup" } }
        ],
        "DBSubnetGroupName": { "Fn::ImportValue" : { "Fn::Sub" : "${NetworkStackName}-DBSubnetGroup" } }
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Once you have created your CloudFormation template, you can use the AWS Command Line Interface (CLI) or the AWS Management Console to create a new stack based on the template. This will create the EC2 instance and RDS database defined in the template. You can then use the low-code platform to connect to them and start building your application.

Using Azure Resource Manager with low-code platforms

Azure Resource Manager (ARM) is an IaC service that allows you to provision and manage resources in the Azure cloud. ARM can be used to create and manage a collection of Azure resources, such as virtual machines, storage accounts, and virtual networks, that make up your low-code environment.

To use ARM with your low-code platform, you will need to create a template that defines the resources that make up your environment. This template can include parameters, variables, and functions to allow for more complex environments.

Here is an example of an ARM template that creates a virtual machine and a storage account for a low-code environment:

{
  "$schema": 
  "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "adminUsername": {
      "type": "string"    },
    "adminPassword": {
      "type": "securestring"    }
  },
  "variables": {
    "location": "[resourceGroup().location]"  },
  "resources": [
    {
      "type": "Microsoft.Storage/storageAccounts",
      "name": "mystorageaccount",
      "apiVersion": "2019-04-01",
      "location": "[variables('location')]",
      "sku": {
          "name": "Standard_LRS"      },
      "kind": "StorageV2",
      "properties": {}
    },
    {
      "type": "Microsoft.Compute/virtualMachines",
      "apiVersion": "2021-03-01",
      "name": "myVM",
      "location": "[variables('location')]",
      "properties": {
        "hardwareProfile": {
          "vmSize": "Standard_DS1_v2"        },
        "osProfile": {
          "computerName": "myVM",
          "adminUsername": "[parameters('adminUsername')]",
          "adminPassword": "[parameters('adminPassword')]"        },
        "storageProfile": {
          "imageReference": {
            "publisher": "MicrosoftWindowsServer",
            "offer": "WindowsServer",
            "sku": "2019-Datacenter",
            "version": "latest"          }
        }
      },
      "dependsOn": [
        "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"      ]
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Best Practices for using IaC tools with low-code platforms

When using IaC tools like AWS CloudFormation and Azure Resource Manager with low-code platforms, it's important to follow some best practices to ensure that your deployments are reliable, scalable, and secure. Here are a few best practices to keep in mind:

  • Use version control for your templates: As with any other code, it's important to use version control for your IaC templates. This process can be conducted in Azure DevOps through pull requests that can be reviewed. This will allow you to track changes and roll back to previous versions if needed.
  • Create reusable templates: Create reusable templates that can be used across different environments and business applications. This will save time and reduce the risk of errors.
  • Automate testing and validation: Before deploying your templates, it's important to test and validate them to ensure that they will work as expected. Use tools like AWS CloudFormation Linter and Azure Resource Manager Template Tester to automate this process.
  • Monitor and troubleshoot deployments: It's important to monitor templates to ensure that they are working as expected once deployed. Use tools like AWS CloudWatch and Azure Monitor to monitor your resources and troubleshoot any issues that arise. 
  • Use security best practices: CloudFormation and Azure Resource Manager can help you enforce security best practices, such as using encryption and securing access to resources. By following these best practices you will be able to ensure that your low-code environments are secure.
  • Plan for rollback: It’s a good idea to have a plan in place for rolling back deployments in case something goes wrong. This can be done by creating a backup of the previous state of the resources and storing them in a version control system.

These best practices will help ensure that your low-code environments are reliable, scalable, and secure. It will also streamline the development process and reduce the risk of errors and downtime. 

Multi-cloud and Hybrid Cloud Considerations

As more and more organisations move towards multi-cloud and hybrid-cloud environments, it's important to consider how low-code platforms can be integrated with these environments. Both AWS CloudFormation and Azure Resource Manager can be used to manage low-code environments in multi-cloud and hybrid-cloud setups, but there are a few things to keep in mind.

  • Cross-cloud compatibility: When using IaC tools with low-code platforms in a multi-cloud environment, it's important to ensure that the templates are compatible across different cloud providers. This can be achieved by using a common language such as YAML or JSON for the templates, and by using tools that can convert templates from one format to another.
  • Cloud-specific features: Each cloud provider has its own set of features and services that may not be available on other cloud providers. When creating templates for a multi-cloud environment, it's important to consider these cloud-specific features and ensure that the templates can work with them.
  • Managing different credentials: In a hybrid-cloud environment, managing different credentials for different cloud providers can be a challenge. To overcome this, you can use centralised identity and access management (IAM) solutions like AWS Single Sign-On (SSO) and Azure Active Directory (AD) to manage access to resources across different clouds.
  • Networking and security: Networking and security are critical in multi-cloud and hybrid-cloud environments. It's important to ensure that templates are consistent and adhere to security best practices across different clouds. Tools like AWS Direct Connect and Azure ExpressRoute can also be used to establish private connections between different clouds. Using these tools will ensure that the data is transmitted securely.

In a multi-cloud and hybrid-cloud environment, IaC tools like CloudFormation and Azure Resource Manager can be useful for automating the deployment and management of low-code environments.

Comparison and trade-offs between AWS CloudFormation and Azure Resource Manager 

AWS CloudFormation and Azure Resource Manager are both powerful IaC tools that can be used to automate the deployment and management of low-code environments. However, there are some key differences between the two tools that you should consider when deciding which one to use for your low-code platform:

  1. Cloud-specific services: AWS CloudFormation is specific to the AWS cloud and has a wide range of services and features that are not available on other cloud providers. On the other hand, Azure Resource Manager is specific to the Azure cloud and has its own set of services and features that are not available on AWS.
  2. Cross-cloud compatibility: AWS CloudFormation is specific to the AWS ecosystem, while Azure Resource Manager is specific to the Azure ecosystem. This means that CloudFormation templates cannot be used on Azure, and vice versa.
  3. Language support: AWS CloudFormation supports JSON and YAML for writing templates, while Azure Resource Manager supports JSON and its own language, called Azure Resource Manager Templates (ARM Templates). This means that if you are already familiar with JSON and YAML, you may find it easier to use CloudFormation.
  4. Level of abstraction: AWS CloudFormation provides a higher level of abstraction than Azure Resource Manager. This means that CloudFormation can handle more complex tasks and abstract away some of the underlying infrastructure details. However, this also means that CloudFormation may not give you as much control over the underlying infrastructure as Azure Resource Manager.
  5. Cost: Both Azure Resource Manager and AWS CloudFormation are free to use. However, when using these tools to provision and manage resources, you will incur costs for the underlying resources, like managed services and data transfer.
  6. Community support: AWS CloudFormation has a larger community of business users and developers and, therefore, more resources available for it. Azure Resource Manager, being a newer service, has a smaller community and fewer resources available.

When choosing between AWS CloudFormation and Azure Resource Manager, it's important to thoroughly consider the above factors. Both tools have their strengths and weaknesses, and the best choice will depend on your specific requirements and constraints.

Conclusion and Next steps

This article has shown how managing low-code environments with IaC tools like AWS CloudFormation and Azure Resource Manager can help organisations to improve the development process, increase scalability and streamline operations. By following best practices, using security best practices, and planning for rollback, organisations can ensure that their low-code environments are reliable, scalable, and secure.

In a multi-cloud and hybrid-cloud environment, it's important to consider cross-cloud compatibility, cloud-specific features, managing different credentials, and networking and security. By considering these factors, organisations can use IaC tools to automate the deployment and management of low-code environments across different clouds.

If you are interested in learning more about managing low-code environments with IaC tools, we recommend these resources: 

Audacia is a software development company based in the UK, headquartered in Leeds. Our teams work closely with organisations to accelerate their digital transformation journeys by deploying solutions that make it easy for users to build and deploy new applications quickly. We can provide low code/no code consultancy, implementation and managed services for your low-code development project. 

This article was written by Audacia's Head of Engineering, Richard Brown.

View more technical insights from our teams of consultants, business analysts, developers and testers on our technology insights blog.

Top comments (0)