Pricing overview
Instance costs: Running a G4DN.xlarge for 10 hours in
us-west-2 typically costs around $2.50.**Storage will cost 0.015 a gig per month.**For example, 128 GB = 1.92/month.Bandwidth: AWS gives you 100 GB free per month. At 25 Mbps, that covers roughly 20 hours of game streaming before any additional charges apply.These figures assume you follow all steps in this guide for maximum cost efficiency and are not using other AWS services that consume extra bandwidth. Instance pricing is best-case — not every instance will be this cheap per hour.Getting started
The process is not difficult. However, some parts may feel technical. Feel free to create a GitHub issue if you need help. AWS is the official platform used for testing.1
Request a limit increase
AWS requires you to request a quota increase before you can launch GPU instances. Open the AWS console and search for Service Quotas.Navigate to AWS Services → Amazon Elastic Compute Cloud (Amazon EC2), then search for
G. Select All G and VT Spot Instance Requests and click Request quota increase. Request at least 8** vCPUs** (this is the minimum; you can request more).AWS may close your support case and if that happens, reopen it and explain your reasoning again. If your account is too new, they may decline. Repeat the request every month if you need. When writing your request message:- State your own reason in your own words
- Mention the specific applications or workflow you want to support
- Be polite and thankful
- Do not copy-paste the example below verbatim
“Hello, I was interested in starting a small Workstation instance on EC2 so I can improve my workflow and access my work from wherever I am. I am simply requesting a limit increase of <4 or 8 vCPUs> in the us-blank-2 region.”Check your email frequently for a response.
2
Create a Windows Server instance
AWS supports many GPU instance types. The most widely available is the G4DN, which uses a Tesla T4 (roughly comparable to an RTX 2080) and runs the vast majority of games successfully. Newer generations offer more performance for similar or lower cost:
Configure storage256 GB is the recommended storage size. For larger game libraries, 512 GB is still affordable. When configuring the volume:
- G5 — closer to 30-series NVIDIA consumer GPUs
- G6 — closer to 40-series NVIDIA consumer GPUs, with options for partial or full NVIDIA L40
us-west-2) may have more G5 and G6 availability than Northern California (us-west-1). Evaluate your options using the AWS spot instance pricing page.Spot instances are cheaper than on-demand and are rarely interrupted. The availability of spot capacity depends on the region — less popular regions may actually have more.Once you’ve decided, log into your AWS dashboard and navigate to EC2, then click the orange Launch instances button.Configure name and tagsUnder Name and tags, click Add additional tags. Enter your instance name and select Volumes under Resource types — this ensures the storage volume gets the same name tag, which matters for the automation scripts later.Choose an instance typeThe G4DN.xlarge is recommended for its wide availability. Select it from the instance type list.Create a key pairUnder Key pair (login), create a new key pair and download the file. You’ll need this to retrieve the Administrator password for your new server.Configure the security group (firewall)Select Edit on the Network settings panel. Add a rule for RDP with source set to My IP — this is required for the initial setup. Opening streaming ports is optional if you plan to use Tailscale (recommended), since Tailscale creates a secure tunnel and you won’t need to expose ports publicly.Sunshine ports
Sunshine ports
If you cannot use Tailscale and need to open Sunshine ports directly, add the following inbound rules to your security group:TCP:
35043 47984 47989 47995 47996 48010UDP: 47998 47999 48000 48010Amazon DCV port
Amazon DCV port
If you plan to use Amazon DCV without Tailscale, consult the streaming technology page for the port to open. Using Tailscale is more secure and avoids exposing this port publicly.
- Change the volume type to GP3 for better performance and value
- Click the blue Advanced link and uncheck “Delete on termination” — this is critical; if you skip this step, your data will be deleted when the instance stops
3
Run the script
Before running the script, review the streaming technology documentation to decide which streaming option you want to use — Parsec, Sunshine, or Amazon DCV.Generate IAM credentialsThe script needs AWS root keys to download GPU drivers. Visit the IAM security credentials page, scroll down to Access keys, and click Create access key. Save these keys somewhere safe — you’ll need them again. Do not publish them publicly or use them on untrusted devices.Run the scriptOn your server, open PowerShell as Administrator and run:Step 2 of the script will ask whether you want to install Tailscale. The recommended answer is yes. Tailscale will open automatically, and you can log in using any supported method or scan a QR code. Once installed, create a free Tailscale account on your personal computer and install the Tailscale app there as well.
Connect to your streaming technologyWhen the script reaches step 3 and installs your video drivers, it will ask you to restart. Reject the request for now. Once you do, complete the connection steps for your chosen streaming technology:
Manage bandwidthSet your maximum bitrate to 10–15 Mbps in Parsec or Moonlight (the cap is 25 Mbps) to avoid unexpected bandwidth costs. If your personal computer supports it, enable the H.265 codec in Moonlight — it uses less bandwidth than H.264. Some computers cannot decode H.265 in real time, in which case H.264 is required.Verify your storageAfter stopping your instance for the first time, check the AWS Volumes dashboard after a couple of minutes to confirm your storage volume is still there. If it is gone, your volume was set to delete on termination, you must recreate the instance and repeat all steps with that option unchecked.
Alternative: Dynamic DNS
Alternative: Dynamic DNS
If you cannot use Tailscale at all and cannot use subnet routes, you can use Dynamic DNS to get a stable domain name that points to your instance. Duck DNS is a free option (and is itself hosted on AWS).This is needed because without a stable address, Moonlight will become unpaired from your server every time the instance gets a new IP address, requiring you to manually re-pair.To set up Duck DNS:
- Create an account using one of the sign-in options at the top of the Duck DNS site
- Go to Domains and create a new domain (e.g.,
myworkstation.duckdns.org) - Enter the IP address you used for RDP into the IP address field
- Parsec
- Sunshine
- Amazon DCV
Make sure you are logged in to Parsec on both your personal computer and the server. They sync automatically — your server will appear in Parsec whenever it is available. That’s all you need to do.
Seeing a black screen?
Seeing a black screen?
If you see only a black screen after connecting, or you see your desktop but cannot interact with it, try the following:
- In Moonlight’s settings, make sure Capture system keys is enabled
- Press
Windows + P(orCommand + Pon Mac) - Use the Up arrow once or the Down arrow twice, then press Enter
4
Optimize storage costs
If you plan to use your server only for a short period (a few days) and then delete it, you can skip this step. Just make sure to delete the instance storage when you are fully done. For long-term use, this step saves a significant amount of money.
Old script
Old script
Create the Lambda functionSearch for Lambda in the AWS console and click Create function. Select Python as the runtime. Paste the following code into the
lambda_function.py editor:Workstationand us-west-2 with your actual values before saving.Set the timeoutGo to the General configuration tab and click Edit. Set the timeout to the maximum of 15 minutes. The first snapshot (and any snapshot after large data changes) can take a long time, and a shorter timeout will cause the function to fail.Grant permissionsStill in the General configuration tab, click the IAM role link at the bottom (labeled something like View the xxxxxxx-role-xxxx role on the IAM console). On the IAM page, click Add permissions and attach the AmazonEC2FullAccess policy. This allows the function to manage your EC2 volumes.Set up the EventBridge triggerSearch for EventBridge in the AWS console and select your region. Create a new rule with any name and description. For the event pattern, configure:- Service: EC2
- Event type: EC2 State-change Notification
- Specific state(s): terminated
- Target: Lambda → select the Lambda function you just created
What if I make big changes?
What if I make big changes?
If you install numerous games or files between sessions, the Lambda function may time out before the snapshot finishes (even with the new one). If this happens, monitor your AWS dashboard after stopping the instance.GP3 volumes (not converted) should NOT be there, you can convert it manually:
- Go to Snapshots and select the snapshot that was created
- Click Create volume from snapshot and choose SC1 as the volume type
- Delete the original GP3 volume and the snapshot
- Name the new SC1 volume the same as your instance name
5
Automate instance startup
This step sets up a script on your personal computer that starts your instance automatically — converting the SC1 volume back to GP3, creating an AMI, launching a spot instance, and cleaning up — all without logging into the AWS console each time.Install and configure the AWS CLIInstall the AWS CLI on your personal computer. Then open your terminal and run:Enter the credentials you created earlier. Set the output format to Save as a Use a text editor like Notepad++ (Windows) or TextEdit (macOS) to fill in the values at the top of the file before saving.
json and the region to your workstation’s region.Download and configure the startup scriptChoose the script for your operating system, fill in the values at the top, and save the file.- Windows (.ps1)
- macOS / Linux (.sh)
.ps1 file. To run it, open PowerShell, navigate to the directory where the file is saved, and run: