Amazon AWS

Amazon AWS is perfect for the Enterprise customers who wish to have a very robust platform with high availability. It is used and trusted by some of the largest companies in the world to serve as their Cloud infrastructure. Below is a diagram showing the architecture of an AWS Deployment.


We assume in this that you already have an account with Amazon AWS. Once you create an account, you will then be ready to create your Enterprise deployment.


Before we start our deployment, we will first need to create a Database to store all of our Forms and Submissions within our deployment. We will use the fantastic DocumentDB to serve as our central database.

To get this setup, please follow the following instructions.

  • Within your AWS Console, type DocumentDB and click on the link that says Amazon DocumentDB

  • Now that you are within the Amazon DocumentDB Clusters section, click on the link that says Create

  • In the next section, select 3.6.0 for the Engine Version. 4.0.0 support is coming soon.

  • In the next section, provide a Master username and a secure password, then press Create Cluster

  • Now that our DocumentDB cluster is created, we will now click on the cluster link, and then copy the application connection string. It should look like the following.

  • Next, we will want to change this connection string to be a standard connection string. We will do this by first removing everything after the “:27017/”, and then adding our database name to the end of :27017/. We can pick any name here, but for this example, lets use formio

  • Now, we will want to replace <insertYourPassword> with the password you chose above when you created the cluster.

  • Finally, we will want to add ssl=true to the end of the url to indicate that we have a database connection over SSL.

  • Make sure to copy this connection string for use later.


Before we setup our API and PDF servers, we need to first setup an S3 Bucket which will contain the uploaded PDF’s used by the PDF server.

  • To setup an S3 bucket, we will first just navigate to the S3 section of Amazon AWS by clicking on the home page, and then typing S3 in the Search bar. Click on S3 in the Search results.

  • On the next page, click on the Create Bucket button.
  • On the next page, give it a Bucket Name of pdf-server, and then click Next
  • Now skip over the Configure Options page by pressing Next
  • Now skip over the Set permissions page by pressing Next
  • Finally, press Create Bucket to create your new S3 bucket.
  • Now that we have an S3 bucket created, we now need to create an IAM role with admin rights to this S3 bucket. We will do this by navigating back to the AWS homepage and then typing IAM in the Search bar.

  • Within the IAM page, we will create a new user by clicking on Users and then clicking on Add User.

  • In the next page, we will call our User pdf-server, and we will want to make sure to check the Programmatic Access under the Access Type section. Then click the Next button.

  • In the Permissions page, we will want to Attach existing policies directly, and then we will want to Create Policy.

  • This will open up the “Create Policy” page. In this page, we will first want to click on Choose a service. Select S3.

  • Skip over the Actions section.

  • In the next Resources section, we will want to click on the Add ARN link next to the bucket section. Here we will provide our pdf-server bucket in the name, and then click Add

  • In the object resource section, click Add ARN and then provide the pdf-server bucket name, and then click on the Any checkbox for the object section.

  • For the other Resources, click on them and then click on the Any settings for all of them. When you are done, it should look like the following.

  • You can now click on the Review Policy button at the bottom of the page.
  • For the Name, just provide pdf-server-s3, then click on the Create policy button.

  • Now that a policy has been created, we can attach that policy to the IAM role by going back to that page and then search for pdf-server-s3 in the search bar.

  • Now, click on the Next button in the IAM wizard. Skip ahead until you get to the Review page, and then click Create user
  • On the next page, make sure to copy the Access Key ID as well as the Secret access key, and save this for later. We are now ready to move onto setting up the Elastic Beanstalk deployment!

Elastic Beanstalk

Now that we have our database and S3 configured, we will be using Elastic Beanstalk to manage our docker deployments.

  • Within the AWS Home page, type Elastic Beanstalk into the search and click on the link provided.
  • Once you are within the Elastic Beanstalk main page, you will want to click on the link that says Create Application

  • NOTE: You may see a different page that has a link that says Create New Environment. If so, then click on that link, and then select the Web server environment on the next page and press Select.
  • In the next screen, provide an Application Name

  • Scroll down and then select Docker as the environment, and then select Multi-container Docker.

  • For this next section, click on Upload your code. Then follow the instructions below.

  • Application Code: For this, we will want to upload a ZIP provided @ After you click Upload button, we will select this file as follows.
  • NOTE: If you are running this environment in the US Gov Cloud, then you will need to use the ZIP provided @

  • Next click on the button that says Configure More Options

  • In the next page, click on Edit link within the Software section.

  • We will now need to provide the following environment variables within the environment variables section.

    Setting Description Example
    MONGO The MongoDB connection string to connect to your remote database. This is the value we copied before. mongodb://
    LICENSE_KEY The license key for your deployment. You will get this when you upgrade a project to Enterprise. <—YOUR LICENSE—>
    PORTAL_ENABLED Used to enable the On-Premise portal true
    ADMIN_EMAIL An admin account you would like to use as the first Admin user
    ADMIN_PASS A password for the first Admin user. This can be changed after the deployment is finished. CHANGEME
    DB_SECRET A secure secret that you will pick that is used to encrypt the project settings. CHANGEME
    JWT_SECRET A secure secret that you will pick that is used to establish secure JWT tokens. CHANGEME
    FORMIO_S3_BUCKET This is the name of the Bucket we created in the previous section pdf-server
    FORMIO_S3_REGION This is the region which the S3 bucket was created us-east-1
    FORMIO_S3_KEY This is the Key we saved in the previous step. ATHSLKJK234LSDLLKJS
    FORMIO_S3_SECRET This is the Secret Key that we saved in the previous step. nsl23lkjsdf9009sllkjowoi8sous923sd
    PDF_SERVER (optional) Use this configuration if you would like to globally set the PDF_SERVER url to the deployment. See Project section for more information
  • NOTE: If you wish to secure your Environment Variables from visibility, then we recommend looking into the Amazon Key Management Service @

  • These settings will look like the following.

  • Now press the Save Button to save your environment settings.
  • Next we will configure the Instances settings

  • Within the instance settings, we need to ensure that the Security Groups enabled are the same as those we established for DocumentDB. By default, this is going to be the default security group. Select this and press Save button.

  • Next we will configure the Capacity settings.

  • Within this section, we will make sure we select a size of instance that is suitable for our Environment. recommends the following configurations for the following environments.

    Environment Type Instance Size
    Development Environments at least t3.medium
    Production Environments at least t3.large

    For this example, we will just select t3.medium.

    Now press Save button at the bottom of the page.

  • Next, we will configure the VPC Settings, to ensure this deployment is within the same VPC as our DocumentDB. We can do this in the Network settings.

  • We need to ensure that our instances are in the same VPC as our DocumentDB database as well as the same subnets.

  • Now press the Save button to save the Network settings.

  • Now press the Save Button to save all of your environment settings.
  • You can now press the Create App button at the bottom of the page to build your environment.
  • This will now create a new Environment within AWS for your deployment. We can now click on the Application URL and you should now see your portal.

    We are now ready to create a new Project! Project

  • Now that we have our deployment up and running, the first step is to login to our new deployment. On the first page, we will now use the ADMIN_EMAIL and ADMIN_PASS values (which we added to the Environment Variables in a previous step) to authenticate into the developer portal.

  • Once you are logged into the Developer Portal, we will now create a new Project.

  • In the popup modal, give your project a title and then click Create Project

  • Once you are within the Project page, click on the Settings button, then click PDF Server section.

  • NOTE: If you wish to globally set the PDF server for all projects, then you can provide this value as the PDF_SERVER environment variable within your Elastic Beanstalk deployment.

  • Next, set the PDF Server URL to the Domain name with a “pdf” subdomain, like so.

  • You are now completely configured and ready to upload PDF files and generate PDF’s of the submissions within!

Domain Routing (Route 53)

Now that your Environment is up and running, the next task is to attach a Domain to the Elastic Beanstalk deployment. If you configured the Elastic Beanstalk deployment to use High Availability, then it will have created some Elastic Load Balancers in front of the deployment which you can link the DNS records against.

  • To get started, navigate to the homepage and then search for Route 53

  • Next, you will need to created a Hosted Zone

  • You will now provide your domain name and then press Create hosted zone
  • Next, you will create a new Record Set and then provide the following record.
    • *
    • Type - A Record
    • Alias - Yes
    • Then select the Elastic Load Balancer as the target.
    • Now press Create
  • When you are done, your routes should look something like the following.

  • Now, you set your domain Nameservers to point to the ones provided by Route 53. Once the domains evaluate, then you should be able to see the deployed API within that domain.
  • Next, go back into your Portal, and then configure the PDF Server URL that we configured in a previous step with the new DNS name, which will be something like