Mendix Cloud Deployment – AWS EC2

Mendix is known to be the leader in Low Code Space and is constantly updating and improving the tools offered to Pseudo Developers and Analysts to start building their application using Low Code. Mendix Studio Pro which can be considered as an IDE for developing Mendix Web & Mobile applications is a visual Modeller that helps in creating Layouts, Interactive Pages and Business Logic using visual Paradigms like Drag & Drop widgets for building the page and Flowcharts for backend Logic. Mendix offers flexible deployment options such as below:

  • Mendix Public Cloud
  • Siemens MindSphere Cloud using Cloud Foundry
  • Public Cloud platforms such as AWS and Azure using Mendix Runtime
  • Docker Container-based Deployment with embedded Mendix Runtime
  • Access to AWS Portal with sufficient access to create an EC2 Instance.
  • Oracle JDK 11.
  • PostgreSQL, MySQL, or SQLServer database up and running.
  • Basic knowledge of navigation and Shell commands in a Linux environment.
  • Mendix Application Package having (.mda) extension which can be generated using Mendix Studio Pro by selecting Project >> Create Deployment Package.

Deploying the Application to an EC2 Instance

  • Create an EC2 server in the AWS Portal with CentOS7 as the Base AMI Operating System with at least of the size t3.medium or above depending on the nature of the Application. In this blog, we are deploying a single Page Application for which t3.medium is sufficient.
  • Log in or SSH into the EC2 server and Unzip or Extract the Oracle Java JDK 11 to a suitable directory such as /usr/lib/jvm and update the JAVA_HOME Path to point the Java Binary such as /usr/lib/jvm/Java_JDK_11/bin. After updating $PATH, verify by checking the Java version as below and Java JDK 11 should now be available in Shell.
Mendix Application in a vanilla Linux environment
  • Login or SSH into the EC2 server and download the m2ee-tools which are necessary to run a Mendix Application in a vanilla Linux environment. Head over to the below GIT repository and from the Releases section, download the latest version (7.2.2) at the time of writing this blog.
  • Now we have to upload the Project Package .mda to the EC2 server and create a directory called application under which the below directory structure is to be created with empty folders for m2ee-tools to run the package. The Application MDA package should be present inside the ~/application/data/model-upload directory.
Mendix Application MDA package in EC2
  • Prepare the configuration m2ee.yaml file.
    A sample m2ee.yaml file is present at the below link. We need to modify the App Name, Database connection parameters like Endpoint, Username and Password only. Rest of the YAML settings can be kept default.

  • Lastly, we need to add the below red highlighted command in ~.bashrc profile either via Nano or any suitable text editor. This command ensures that m2ee-tools and all other dependencies are present on the path. Once edited, logout and log back into the server via ssh.
  • Enter m2ee CLI by entering m2ee in Shell and hitting enter. The prompt should now change from centos user to m2ee as below.
  • Now that we are inside the m2ee CLI, we need to be executed the below commands consecutively.m2ee(centos): unpack PackageName.mda
    m2ee(centos): startThe first command unpacks the MDA Package. And the START command initially will download the Mendix Runtime and then starts the Application.


Once the Runtime is successfully started, we should see a similar output in the m2ee prompt as below.

Now we can open any Browser and point to the public IP of the URL as below and should be able to see the Application Home Page.


Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.