Hosting RESTful Engine on AWS with EC2 (HTTP)
It is assumed that you already have an AWS account and have the correct credentials and permissions to launch EC2 instances in your Virtual Private Cloud (VPC). Although almost everything can be done from the AWS CLI, the context of these instructions will be the AWS Management Console.
Creating RESTful engine instance with basic Windows Server AMI
The AMI and Instance Types mentioned will fulfill most requirements, but it is ultimately up to you to select the configuration that best meets your needs.
- Select EC2 from the Compute Services menu
- Select Instances from the left hand menu
- Click the Launch Instance button at the top of the screen
- Select the Quick Start menu item from the left hand menu
- Find the Microsoft Windows Server 2019 Base AMI and click the Select button
- Select the Instance Type t2.xlarge
- Click the Review and Launch button at the bottom of the page
- Click the Launch button
- The Key Pair dialog will appear. The Key Pair allows you to securely connect to your instance.
- Select Create a New Key Pair
- Specify a meaningful Key pair name
- Click the Download Key Pair button. A .PEM file will be downloaded to your computer
- Click the Launch Instance button
- From the Launch Status page, click the View Instances button
- The Instances page will be shown and you will see that your instance is initializing
- Select the instance from the list by selecting the radio button
- Select Actions -> Get Windows Password from the top menu button panel
- The Retrieve Password dialog will show.
- Click the Choose File button and browse to the .PEM file you created in step 12
- Click the Decrypt Password button
- The password for the administrator account will be shown in plain text. Copy this to use in connecting to your instance through RDP using the Public DNS listed on the same dialog. When using RDP, allow local resources (clipboard and drives) to make configuration easier.
Configure EC2 instance for ease of use
Allow HTTP Traffic to your EC2 instance
- From the Instances page, find the security group in the details section and select it.
- At bottom of screen, select the Inbound tab and then click the Edit button
- Click the Add Rule button
- For Type, select HTTP and then click the Save button
Allow administrator to download from the internet
- Launch Server Manager
- Select Local Server on left hand menu
- In Properties pane change IE Enhanced Security Configuration Click on "On" and select "Off for Administrators"
- Click OK button
Installing and Configuring IIS
- Open the Server Manager and click Add Roles and Features from the Manage menu item
- When the dialog opens, click the Next button
- For Installation Type keep the default selection of "Role-based or feature based installation", Click the Next button
- For Server Selection, keep the default selection and click the Next button
- For Server Roles, select Web Server (IIS) and click the Next button
- A dialog will be shown, click the Add Features button
- Click the Next button
- For Features, select the following
- ASP.NET 4.7
- HTTP Activation
- Test that IIS is installed successfully by navigating to http://localhost/ in the browser of your instance. You should see the Internet Information Services (IIS) default page.
- Test that you can reach the VM from outside of your VPC by navigating to the Public DNS of your instance from your local PC. (You can find this in the Details section of your Instance within the AWS management Console for Instances)
Installing the RESTful engine
Assuming you have an RDP session to your EC2 instance...
- Start Internet Explorer
- Navigate to : https://www.windwardstudios.com/version/version-downloads
- Find the RESTful Engine link in the most recent version and click on the link, when prompted select Save.
- Unzip RESTfulEngineAndClient.zip
- Unzip RESTfulEngine.zip
- Copy the RESTfulEngine directory to C:\inetpub\wwwroot
- Start the Server Manager
- Select Tools >> Internet Information Services (IIS) Manager
- Expand the Connections Treeview until you see the Default Web Site node
- Select the Default Web Site node and then in the right most menu select Stop
- Right click the Sites node from the left most treeview and select Add Website...
- The Add Website dialog will show
- Specify a Site name
- Specify the Physical path of the RESTfulEngine directory
- You may see a warning dialog concerning Port 80 being assigned to another site, just select the OK button
- Update the web.config file with your license key.
- Test that the RESTful engine is installed and configured correctly by clicking the Browse link in the right-hand Actions menu.
- Test that the RESTful engine is accessible from outside your VPC by navigating to the Public DNS of your instance from your local PC. (You can find this in the Details section of your Instance within the AWS management Console for Instances)