Launching from AWS Listing

This guide will help you learn how to launch and execute OpenRefactory's Intelligent Code Repair (iCR) on an Amazon EC2 platform. Once an instance of iCR is executing on the EC2 platform, that server is operated entirely by you. OpenRefactory has no access to the instance and so your source code remains private to you. The guide assumes familiarity with Amazon AWS and the EC2 console.

The video below can be used to quickly learn the steps needed to launch iCR for Python from AWS. Here are the steps that are needed:

  • Locate the Intelligent Code Repair (iCR) for Python listing on the AWS Marketplace Website;

  • Click on the Continue to Subscribe button to bring you to the agreement page;

  • Assuming that the agreement terms are as expected, click on Continue to Configuration to begin the configuration of your instance of iCR;

  • Click on Continue to Launch after confirming that your instance will launch in your preferred region;

  • The next configuration page is titled Launch this software and you will need to set a few items here to enable access to your instance;

  • Scroll down to the Choose Action entry. Make sure it is set to Launch from Website;

  • Continue scrolling down to the next item which is the EC2 Instance Type. Choose one of the instance types preset by OpenRefactory. These instance types may not be available in all parts of your region, so select a Subnet Settings value where the instance type is supported. If you get an error later when starting the instance, you may need to come back here and choose another Subnet where the instance type is supported;

  • The next item that you need to establish is the Security Group Settings. These are the ports that will be opened in the AWS firewall to allow your browser to reach iCR. OpenRefactory has already preconfigured these so select Create New Based On Seller Settings. That will load up the correct port information for you. You need to give your security group a name and description to continue;

  • The final configuration step is to scroll to the bottom of the page to where the Key Pair Settings are established. You will need to have a pair of SSH keys to allow you to SSH into your server if you need to. One of the pair is kept on your client machine and the other half of the pair is stored on your EC2 instance. For key pairs, you may already have created some so you may select one from the ones you already have.

  • You are now ready to launch your EC2 instance with iCR. Click on the Launch button to create your instance;

  • Once your instance is launched you will need to go to the EC2 console to set one last configuration value that could not be set using the normal launch configuration options. To go to the EC2 console, simply click on the EC2 Console link shown in the "Congratulations!" box;

  • Once at the EC2 console, it is recommened that you give it a name to distinguish it from any other EC2 instances that you may have running. Then, click on the Instance ID link to take you to the detailed information page for your instance;

  • Once in your instance page, look for the Actions pull-down menu at the top right of the display. Click on it to display the options and choose the Modify Instance metadata options as we need to set one of those before iCR can run properly;

  • Look for the IMDSv2 option. Set it to Optional to enable the correct API suite that iCR needs to work with AWS and click on Save to capture your choice;

  • Finally, it is strongly recommended that, upon returning to your EC2 console, that you go to your instance and copy the Public IPv4 address value. You will need the address to configure your OAuth access and to connect your browser to iCR.

Check out the video below which demonstrates all of the above steps.

NOTE: The Public IP address for the new instance which you just created (and copied) is valid only as long the instance is running. OpenRefactory suggests that the instance be Paused and then Restarted in between usage to save on EC2 charges. When the instance is restarted, however, a new IP address will be assigned to the restarted instance requiring you to reconfigure your OAuth values. This is annoying and so it is recommended that you obtain an Elastic IP address for your instance so that it will remain constant.

Once you have your IP address (an Elastic IP address is recommended), follow the steps in the section titled Authorizing Access to Your Source Code of the iCR for Python User Guide to set up the OAuth configuration which will permit iCR to access your source code from your preferred Version Control System (VCS).

With OAuth prepared, you can now complete the next step to enable iCR for Python to run on AWS.

Last updated