This is a simple CloudFormation template that provision a g4ad.xlarge instance using the g4ad graphics-intensive instances AMI.
Be sure that your AWS account got enough quotas to use G4
appliances. Follow the AWS documentation to check that up. The g4ad.xlarge
instance require a minimum of 4 quotas to function.
awscli
installed and configured- enough quotas to spin up the
G4
instance
# Create the KeyPair used to log in into the instance
mkdir ~/.ssh/aws-private-keys && cd ~/.ssh/aws-private-keys
aws ec2 create-key-pair \
--key-name CloudGamingKeyPair \
--query 'KeyMaterial' \
--output text > CloudGamingKeyPair.pem
# Clone the repo
git clone https://github.com/fabienchevalier/ec2-cloudgaming && cd cloudformation
Edit deploy-cloud-gaming-ec2.cfn.yaml
:
- IpProtocol: tcp
FromPort: 8443 #NICE DVC Server
ToPort: 8443
CidrIp: 0.0.0.0/0 #<= Add your own IP address
Easy tip to find out your own IP address : curl ifconfig.me
Deploy :
aws cloudformation deploy \
--template deploy-cloud-gaming-ec2.cfn.yaml \
--stack-name CloudGamingStack
Retrieve the instance ID of the instance :
aws ec2 describe-instances \
--filters "Name=tag:Name,Values=CloudGamingInstance" \
--query 'Reservations[].Instances[].[InstanceId]' \
--output text
Then :
aws ec2 get-password-data --instance-id i-1234567890abcdef0 \
--priv-launch-key ~/.ssh/aws-private-keys/CloudGamingKeyPair.pem
That should give you the Administrator password on a JSON format :
{
"InstanceId": "i-1234567890abcdef0",
"Timestamp": "2013-08-30T23:18:05.000Z",
"PasswordData": "&ViJ652e*u"
}
Connect to the instance via RDP and run the PowerShell script from the PowerShell folder to install the Nice DCV Server (you can also use Parsec if you wish).
Download the latest Nice DCV Client for your OS.
Connect via the public ip-address of your instance using Administrator
as a login. Password would be the one that you retrieved in the JSON from awscli.
Enjoy 😎