How to Setup Refinitiv’s Amazon EC2 Machine Image for developing real-time application

Wasin Waeosri
LSEG Developer Community
8 min readAug 30, 2019

The original article on the Refinitiv Developer Community is available here.

Introduction

Update: October 2022

We are living in the cloud age. Developers do not need to set up their own local machine or dedicate on-premise environment to implement, test and run their application, they just create a VM machine on the cloud to perform those tasks.

In the financial world, what would you need to get the actual update of the stock price that you just bought? You can use your phone to watch it live with any apps, but was it live? And as a developer, how do we transfer such data to the hands of app users.

In the past, in order to consume financial data from exchanges or data providers, banks or financial service providers would require a lot of investment in their infrastructure including:

  • Planning the network, computing, and storage capacities
  • Buying network devices, computers, and storages,
  • Installing required operating systems and libraries.

This may take several weeks or months before the clients can really see the actual data. With cloud technology, developers/market data scientist can get real-time streaming market data from the cloud feeds to application or machine-learning directly over the internet connection.

Refinitiv Cloud Solution

Amazon Elastic Compute Cloud (Amazon EC2) is world class leading web service that provides secure and re-sizable compute capacity in the cloud for developers. Using the Amazon Web Services, Refinitiv Real-Time Optimized (RTO — formerly known as ERT in Cloud) gives developers access to the best in class Real Time market data delivered in the cloud (over 70 million securities covering 500 exchanges globally, and thousands of over the counter markets). Refinitiv Real-Time Optimized supports both standard WebSocket connection and Refinitiv’s proprietary highly-optimized connection protocol named RSSL.

Refinitiv Real-Time Optimized provides Refinitiv Amazon Machine Image (AMI) for quick and easy learning how to implement market data application. Developer can setup and launch EC2 instance based on Refinitiv AMI to run the real-time streaming examples which already included in the AMI.

In order to launch Refinitiv AMI, we will guide you through the following steps:

  • Prerequisite
  • How to launch your EC2 Amazon Linux instance based on Refinitiv’s AMI
  • How to connect to your EC2 Amazon Linux instance
  • How to run ERT in Cloud demo application inside your newly created EC2 Amazon Linux instance
  • Troubleshooting
  • References

Prerequisite

The following accounts and software are required in order to run this quick start guide:

  1. Amazon AWS account
  2. Web Browser
  3. Internet connection
  4. SSH client software or Putty application
  5. Amazon AWS key pair
  6. Refinitiv Real-Time Optimized Username/machine ID and password access credentials.

Please contact your Refinitiv’s representative to help you to access the RTO account, and services. You can find more detail regarding the RTO access credentials set up from the Getting Started for Machine ID section of the Getting Start with Refinitiv Data Platform article article.

If you are new to Amazon AWS, you can subscribe to AWS Free Tier account which gives you free hands-on access to the AWS platform and services. We highly recommend you follow the Amazon AWS Setting Up with Amazon EC2 and Getting Started with Amazon EC2 Linux Instances tutorials before proceeding further in this quick start guide to create your key-pair, VPC, and Security Group which are required for your EC2 instance.

How to launch your EC2 Amazon Linux instance based on Refinitiv’s AMI

  1. Firstly, login to AWS Management Console with your IAM user.
Login to AWS console as IAM user

2. Refinitiv AMI is available in all Regions. This article will use “US East (N. Virginia)” Region as a demonstration. Once you are logged in to the AWS Management Console, choose your desired Region In the Region section. There might be unavailability of AMI in some Regions for maintenance, please choose other Regions instead.

Choose US East N. Virginia region

3. Go to EC2 Dashboard page, then choose IMAGES -> AMIs section.

EC2 Dashboard

4. In the AMIs page, select “Public images” and then search Refinitiv’ AMI name with Refinitiv name filter.

Searching Refinitiv AMI

5. Select Refinitiv’s AMI name Refinitiv Real-Time Examples — Amazon Linux AMI , right click and choose “Launch” menu.

Launch instance 1

6. Select your Instance type. This article uses Instance type t2.micro which is eligible for the Free Tier account as an example. You may choose other instance types based on your cost and requirements. And then click “Review and Launch” button.

Select instance type

7. You may choose “Configure Instance Details” button to configure Instance network and public IP address (see more detail here), storage, etc based on your requirement. Click “Launch” button to launch your EC2 Linux instance.

Launch instance 2

8. Select your key pair which will be used to connect to your instance with your local machine. You can also create a new key-pair for this instance here. Click “Launch Instances” button to launch your Linux instance.

Select key pair

9. Back to EC2 Dashboard, you will see your newly created Amazon Linux instance is running with the instance information such as Instance ID, Public DNS (IPv4), IPv4 Public IP, etc. The main information is Public DNS (IPv4) which is required to connect to this instance.

Instance is running

How to connect to your EC2 Amazon Linux instance

Once your Amazon Linux instance is running, you can connect to your Amazon Linux instance using Putty or SSH client applications. The following information are required to connect to your instance.

  • Your private key file (example: key-pair.pem)
  • Your Linux instance Public DNS

You can find more details regarding how to connect to your Amazon Linux instance from the following AWS documents links below:

This Quick Start Guide uses Git Bash application as a SSH client to connect to Amazon Linux instance with the following command

ssh -i "<your private key file name>" ec2-user@<Your Linux instance Public DNS>

Example:

ssh -i "Administrator-key-pair-us-east-1.pem" ec2-user@ec2-3-83-226-169.compute-1.amazonaws.com
Connecting to AWS Linux instance

Note: You may notice the invalid format warning message. The message means the key is a deprecated format, but AWS is still using it. Please see more detail in this blog post for full detail of this warning message.

How to run ERT in Cloud demo application inside your newly created EC2 Amazon Linux instance

Once you have connected to your Amazon Linux instance, you will be available in your home folder /home/ec2-user location. Your home folder contains the following example and API folders:

Each sub folder contains README.md file which give you a full description regarding the examples detail and how to run examples.

The Real-Time SDK is a suite of modern and opensource APIs that aim to simplify development through a strong focus on ease of use and standardised access to a broad set of Refinitiv and proprietary content and services. The SDK consists of a set of capabilities ranging from low level ‘Transport’ interfaces (ETA API) to very high level content aware stateful interfaces (EMA API).

The Websocket API for Pricing Streaming and Real-Time Services (aka WebSocket API) is a direct access WebSocket API that enables easy integration into a multitude of client technology environments such as scripting and web.

Please refer to following the series of ERT in Cloud Quick Start based on your prefer API and connection:

Note: This Refinitiv based AMI machined already installed all examples required libraries for users.

Troubleshooting

Q: How can I have Refinitiv Data Platform username, password, and client_id?

A: Please contact your Refinitiv representative to help you with RDP/Refinitiv Real-Time Optimized credential and permission.

Q: I have tried to use the App Key Generator page to create my client_id but page keeps asking me Eikon’s email username

A: Please contact your Refinitiv representative to help you with RDP/Refinitiv Real-Time Optimized credential and permission.

Q: I do not have a private key pair file

A: Please follow the steps in AWS Document: Create a Key Pair link to create your private key pair file.

Q: My Amazon EC2 instance does not have a Public DNS IP address

A: The instance Public DNS and IP address need to be configured before launching the instance. Please refer to this AWS Document: Assigning a Public IPv4 Address During Instance Launchlink. This public IPv4 address is automatically released in certain cases (stop instance, etc). If you already launched an instance or need a persistance public IP address, you can associate an AWS Elastic IP Address with the instance.

Note: AWS Elastic IP Address is not included in the AWS Free Tier services.

Q: What should I do after I finish running an example application

A: You can “Terminate” instance to delete your E2 instance permanently or “Stop” instance to just shutdown your instance and release all public DNS IP address. Please refer to AWS Document: Clean Up Your Instance link for more detail.

References

For further details, please check out the following resources:

For any question related to this quick start guide or Refinitiv Real-Time — Optimized, please use the Developer Community Q&A Forum.

GitHub

--

--