Step 3: Run the code - AWS Cloud9

Step 3: Run the code

(Previous step: Step 2: Add code)

  1. In the AWS Cloud9 IDE, on the menu bar, choose Run, Run Configurations, New Run Configuration.

  2. On the [New] - Idle tab, choose Runner: Auto, and then choose Ruby (item 1 in the screenshot shown below).

  3. For Command (item 2 in the screenshot), type hello.rb 5 9. Given this command, ARGV[0] in the code receives a value of 5 and ARGV[1] receives a value of 9.

  4. Choose the Run button (item 3 below), and compare your output to the following.

    Hello, World! The sum of 2 and 3 is 5. The sum of 5 and 9 is 14.

            Output of running the Ruby code in the AWS Cloud9 IDE

Next Step

Step 4: Install and configure the AWS SDK for Ruby