Skip to main content

AWS Machine Image Setup Instructions

This guide will walk you through setting up an instance of the HTML/PDF to ZPL API Server in your private AWS cloud.

Step 1: Login to AWS console

Login to your AWS console, navigate to EC2 Instances, and click on Launch Instance.

EC2 Dashboard

Step 2: Configure the EC2 Instance

  1. Name: Assign a name of your choice for the new EC2 instance.
    EC2 Instance Name

  2. AMI: Select the AMI shared with your account. Navigate to My AMIs, choose Shared with me, and select the zpl-api AMI. Contact support if the AMI is not present. Select ZPL Server VM Image

  3. Instance Type: Choose your instance type based on performance needs. The instance type t3.medium or larger is recommended. Select EC2 Instance Type

  4. Key Pair (Login): Select an existing key pair, or choose Proceed without a key pair.
    Note that logins are usually not required. You will only need a key pair if you plan on modifying any advanced settings.

    EC2 Keypair settings
  5. Network Settings:
    Configure according to your infrastructure. Do not assign a public IP address.
    Firewall & Security group settings: The API server is available via TCP port 8000. Create a new security group and adjust the firewall settings in a later step.

    EC2 Network Settings
  6. Storage: The storage settings are automatically defaulted. It is not necessary to change these settings.
    1x 40 GiB gp3 Root Volume

    EC2 Storage Settings
  7. Launch Instance:: Click on the Launch Instance button. The API server is now initializing and will be available within a few minutes.

Step 3: Adjust Security Group (Firewall Settings)

Adjust the newly created security group to allow connections on TCP port 8000:

  1. Open the new instance, navigate to the Security tab, and click on the newly created Security Group.

    EC2 Security Group Settings
  2. Click on Edit inbound rules.

    EC2 Security Group: Inbound Rules Settings
  3. Add a rule to allow TCP connections on port 8000, according to your networking setup. For example, to allow connections from any IP address in the 10.0.0.0 - 10.255.255.255 range, add a source 10.0.0.0/8.

    EC2 Security Group Settings: Add network rules

Testing of the API Server

With the server up, you can test it by running a request from a bastion host:

# Replace IP_ADDRESS below with your server's IP
curl -X POST \
-H "Content-Type: application/json" \
-d '{ "width":"4", "height":"6", "html":"Hello World" }' \
http://IP_ADDRESS:8000/htmltozpl
Test results from a PDF to ZPL conversion