In this section, you connect to your NICE DCV EC2 instance, setup password required for DCV Remote Desktop Session and launch a DCV Session. You will do all this on AWS Cloud9 terminal.
If you are having issues connecting to your instance, navigate to the EC2 Dashboard in the AWS Management Console. Select your instance and review its details. See also the troubleshooting section at the bottom of this page.
After the instance is running, follow these steps:
Navigate to the AWS Cloud9 environment and open a terminal window.
Use the following command to list running instances and display their names, type, private IP address, and public IP address. Here, the information is filtered to only keep certain details (hence the complex command). The same information is displayed on the EC2 Dashboard.
aws ec2 describe-instances --query 'Reservations[*].Instances[*].[Tags[?Key==`Name`]| .Value,InstanceType, PrivateIpAddress, PublicIpAddress]' --filters Name=instance-state-name,Values=running --output table
You’ll see the following:
Make sure to select the IP address of the instance you want to connect to and not the example IP address shown.
# don't forget to use your OWN ip address # keep the username to ec2-user as is, don't use your name! ssh -i ~/.ssh/lab-dcv-ami email@example.com
You now have an functional instance that can access the internet.
There could be two primary reasons why you cannot connect to your instance:
Set the password for ec2-user as below. Note, this is the password that you will use when prompted while connecting to the DCV Remote Desktop Session.
sudo passwd ec2-user
Create a virtual session to connect to. Note, dcvdemo below is your session name, you can modify as you want. We will use this session name while connecting to Remote Desktop.
dcv create-session dcvdemo