Setup Development Environment

In this section, we’ll setup our development environment. We’ll be using AWS Cloud9, a cloud-based integrated development environment (IDE) that runs in your AWS account. By using Cloud9, there is no need to install software or make any modifications to your local laptop or workstation.

Create your Cloud9 IDE

From the main page of the AWS console, select Cloud9 by clicking the link under Developer Tools or entering “Cloud9” in the Find Services box and clicking the result.

Select Cloud9

On the Cloud9 main page, click “Create environment”.

Cloud9

Name the environment “qldb-lab2” and click “Next step”.

Cloud9

On the “Configure settings” page, leave all of the settings at their default values. Cloud9 will place an EC2 instance in the default VPC. You may select a different VPC and subnetwork in the “Network settings (advanced)” section if you prefer not to use the default VPC.

Cloud9

On the “Review” page, click “Create environment”. After several minutes, your Cloud9 environment will be ready. A “Welcome” page will be presented in the browser-based IDE.

Cloud9

Install/Upgrade Java

At the bottom of the Cloud9 editor is a terminal panel that provides access to the command-line of the underlying EC2 instance. To identify the version of Java running on this instance, type and enter the following command:

java -version

Java Version Java Version

The Java version is at least 8, so we do not need to upgrade it. Now run the following command in the terminal to update the instance. It will take a few minutes for this update to complete.

sudo yum -y update

Install Gradle

Install Gradle, a software build tool, by using the terminal to run the following commands. These commands install and run the SDKMAN! tool, and then use SDKMAN! to install the latest version of Gradle.

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install gradle

Verify the install with the following command:

gradle -version

Java Version