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.
awscliinstalled and configured- enough quotas to spin up the
G4instance
# 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 cloudformationEdit 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 addressEasy tip to find out your own IP address : curl ifconfig.me
Deploy :
aws cloudformation deploy \
--template deploy-cloud-gaming-ec2.cfn.yaml \
--stack-name CloudGamingStackRetrieve the instance ID of the instance :
aws ec2 describe-instances \
--filters "Name=tag:Name,Values=CloudGamingInstance" \
--query 'Reservations[].Instances[].[InstanceId]' \
--output textThen :
aws ec2 get-password-data --instance-id i-1234567890abcdef0 \
--priv-launch-key ~/.ssh/aws-private-keys/CloudGamingKeyPair.pemThat 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 😎