Saturday, May 5, 2018

Getting Started with HCL Informix on AWS

It's Saturday night and I've got a few cold ones in the fridge so let's do this. Let's get an HCL Informix instance up and running on AWS.


  • You have an AWS account (sign up)
  • Your OS is some flavor of Unix/Linux (not really that important)
What are we going to do?
  • Create an AWS Elastic IP address
  • Create an AWS Security Group
  • Create a ssh key pair
  • Configure and launch an EC2 instance running HCL Informix
  • Connect to our EC2 instance and verify the engine is up and running

Create an AWS Elastic IP address (optional)

When you launch an AWS EC2 instance, the instance is given a private IP address and private DNS name that are accessible from all of the EC2 instances in your AWS Virtual Private Cloud (VPC) and these never change for as long as the EC2 instance exists, even if you shut it down and restart it. Nice.

Additionally, when you launch an EC2 instance, it is given a public IP address and public DNS name that is accessible from the public internet, BUT this changes each time you restart the EC2 instance and that's not so nice.

An Elastic IP address is a public IP address and DNS name that you can assign to an EC2 instance so it always has the same IP when you stop/start the EC2 instance and just makes things a little easier. Elastic IPs are free as long as they are attached to a running instance and cost just a penny an hour when they aren't. If that's a little too pricey for you, you can skip this step and connect to the public IP address that's automatically given to your EC2 instance. Just remember that you'll have to go and figure out what the new public IP/DNS name is for your instance from the console each time you stop/start your EC2 instance.

First, open up the AWS console, click on EC2 and then click Elastic IPs in the left hand pane under NETWORK & SECURITY.

Now click the Allocate new address button and then the Allocate button. You should see a message of New address request succeeded and the new Elastic IP address. Make note of this IP and click the Close button.

Learn more about Elastic IP addresses

Create an AWS Security Group (optional, but go ahead and do it)

An AWS Security Group is like a firewall where you define which ports are open to certain IP addresses. We're not going to do anything fun with the Security Group now, we're just going to open up the SSH port to the world so we can get into the box. It'll come in handy later though.

In the left hand pane of the AWS EC2 Console, click Security Groups under NETWORK & SECURITY.

Now click the Create Security Group button. This will give you the Create Security Group pop up where you can give the Security group a name of "Informix DBA SG" and a description of whatever you like. You can leave the VPC as the prepopulated default value.

Now click the Add Rule button to add an inbound rule. For Type, select SSH and Source select Anywhere then click the Create button in the lower right corner.

Learn more about Security Groups

Create a SSH Key Pair

All logins into AWS EC2 instances are passwordless so you need a SSH key pair to login via some command that will look a little like this

ssh -i <public ssh key file> centos@<ip address or DNS name>

Click Key Pairs on the left hand pane under NETWORK & SECURITY and then click the Create Key Pair button.

Give the Key Pair a name as instructed (I'm using informixdba) and click the Create button.

This will create and download an informixdba.pem file to your browser, save it somewhere nice like ~/.ssh because you'll need to reference it later and change the file permissions to 600 via chmod 660 ~/.ssh/informixdba.pem

Configure and launch an EC2 instance running HCL Informix

Finally, the prep is done and we're ready to get into the good stuff.

Click Instances on the left hand pane under INSTANCES and click the Launch Instance button.

Step 1 is to Choose the Amazon Machine Image (AMI) we want to have running on our EC2 instance. We would like the HCL Informix AMI that is found in the AWS Marketplace, so click AWS Marketplace in the left hand pane and type Informix in the Search AWS Marketplace Products bar.

The first item in the returned list should be Informix sold by HCL Technologies. Find it and click the Select button.

You'll be presented with a bunch of information about pricing and the product details. Take it all in and then click Continue.

Step 2 is to Choose an Instance type. Here we get to decide how much CPU/RAM we want our EC2 instance to have. Select a t2.small instance for now and click Next: Configure Instance Details. It is super easy to upgrade later if you want.

Step 3 is Configure Instance Details. We aren't going to do anything here except maybe check the Protect against accidental termination box which will prevent us from destroying the EC2 instance unless we explicitly turn this feature off. This of it like the FULL_DISK_INIT ONCONFIG parameter for EC2 instances. Click Next: Add Storage.

Step 4 is Add Storage. Here we can increase the amount of disk space initially allocated to the EC2 instance. For our purposes, the default of 8GB is enough. You can always extend this later if you need more space. Click Next: Add Tags.

Step 5 is Adding tags, meh. Click Next: Configure Security Group.

Step 6 is Configure Security Group where we'll specify the Security Group we created earlier that opens SSH up to the public. Click the Select an existing security group radio button, click on the Informix DBA SG Security Group we created earlier and then click the Review and Launch button.

Step 7 is review where you review your settings and pricing. Enough already, let's roll. Click the Launch button.

Not so fast...after clicking Launch we've got to setup what SSH key pair we want to use to connect to this instance. Select the informixdba key pair we created earlier, click the I acknowledge box and click the Launch Instances button.

We're given a Launch Status screen, our instance is now launching and we're almost ready to connect to it. Scroll down and click the View Instances button on the bottom right hand side.

Most likely you'll see our t2.small instance in an Instance State of running (and Status Checks of Initializing). The last thing we want to do is assign that Elastic IP address we created earlier to this instance.

Click Elastic IPs in the left hand pane under NETWORK & SECURITY, select the Elastic IP we created earlier (if you only have one, it will already be selected), click the Actions button and select Associate address from the drop down menu.

In the Instance drop down, select the EC2 instance we just launched and click the Associate button.

After you get the Associate address request succeeded message, click the Close button and we're ready to ssh to this instance using the public IP/DNS name that won't change if we stop/start this instance.

Connect to our EC2 instance and verify the engine is up and running

Well, here we are, ready to take our new HCL Informix instance for a test drive. I hope it took longer to type all of that up than it did for you to get to this point. Let's connect to it and see what's what.

ssh -i ~/.ssh/informixdba.pem centos@<elastic IP address or DNS name>

Answer yes to the question about continuing to connect and you should be connected to your brand new EC2 instance running HCL Informix. The centos user is the only account that can ssh into this instance and can only authenticate with that informixdba.pem file so don't lose it.

The centos user doesn't know anything about Informix, but the informix user does so we need to switch to informix after logging in via

sudo -u informix bash

Now we should be able to see the engine and what's the first thing an Informix DBA does instinctively when logging into a box?

[informix@ip-111-11-19-178 centos]$ onstat -

HCL Informix Dynamic Server Version 12.10.FC10ME -- On-Line -- Up 00:13:43 -- 347700 Kbytes
Ain't that sumthin'?

That's all for now, next time I'll setup encrypted communications between a client and this instance over the public internet and do some performance testing.

Don't forget about IIUG World 2018 in Washington, DC October 28 - November 1, 2018.

Register before July 15, 2018 for a $275 discount and submit to present for a 100% discount at


  1. This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.

    AWS Training
    QlikView Training