When it comes to CFML serverless environments, I have watched a lot of videos and read a lot of documentation but never have I come across a session that gets your cfml code working in the cloud so fast. 20 minutes into this 90 minute session by Paul Kukiel of Amazon Web Services and I'm watching my cfml run on AWS. Given this quick win, and despite having another 70 minutes of video to watch, I stopped to take stock of what happened, and how. 

This post walks through several tools and services that were completely new to me. The first such service is AWS Cloud9. This is a cloud-based IDE where we will perform our installations, configurations, and coding.

So once you're signed into the AWS Cloud9 console, click on the Create environment button. From there, you have a few configuration options to choose from:


In the Environment settings shown below, I chose the "free-tier eligible" instance type to see just how little RAM and CPU I can get away with:

After the settings have been added, Cloud9 spins up your environment:

Now that the IDE is set up, it's time to get our hands dirty. Mr. Kukiel provides this Gist and he, along with the folks following from home (like me), proceeds to copy and paste segments of code into the command line, executing packages one at a time. Here is a breakdown of some of what's happening here. 

The Gist Breakdown

Amazon Corretto

Amazon Corretto is Amazon's version of Java. The line of code below from the Gist installs it (or inflates it - it is the cloud after all) in our enviornment: 

sudo yum install -y https://corretto.aws/downloads/latest/amazon-corretto-8-x64-linux-jdk.rpm


Next we install Gradle. Gradle is an open source build automation tool that we will use to package our CF application. Check the Gist for the appropriate commands.


I don't know why I haven't heard about this before. Fuseless runs serverless CFML Lamba functions. For the purposes of this post, we will be cloning fuseless from here (see Gist) for more details. 

The Cloud9 IDE

In the screenprint below you can see that two lines of code have been added to a new file I created called index.cfm. Below that is the command line where the commands from the Gist have been copied and pasted. 

Once index.cfm has been saved, it is time to see your code in a web page by building and deploying (commands also found in the Gist).

Now, copy and paste the Output Value into your browser to see the code in action, including /index at the end.

There is so much more here to dig through, but that will have to wait - I have more video to watch and can't wait to see what's next. If this piqued your fancy as it did mine then go check out Paul Kukiel's presentation and get your CFML code in the cloud right away! 

Resources in a nutshell

FuseLess Serverless CFML Lambda Functions


Gradle Build Tool

Mid Michigan ColdFusion Users Group