File size: 4,619 Bytes
e193183 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | ---
pretty_name: AWS Steam GPU Launch Kit
license: apache-2.0
tags:
- aws
- infrastructure-as-code
- cloudformation
- gaming
- windows
- amazon-dcv
- systems-manager
---
# AWS Steam GPU Launch Kit
Deploy kit for a **per-player Windows GPU host on AWS**: NVIDIA gaming driver, Amazon DCV
browser streaming, a Steam Offline Mode library on its own EBS volume, and IAM-scoped
self-troubleshooting with a self-healing diagnostics loop.
This repo is the versioned artifact registry **and** the execution layer. Artifacts are
fetched with `huggingface_hub`, so a runner that has only the AWS CLI and a token can
deploy without a git checkout.
## Read these three constraints first
1. **One Windows instance = one player.** Amazon DCV's Windows server supports console
sessions only — virtual sessions and GPU sharing are Linux-only features. Scale by
adding instances, never by adding users to one box.
2. **Steam credential sharing is outside Valve's terms.** Offline Mode is legitimate for
*your own* second machine. For other people, use **Steam Families** (up to six members,
one play slot per owned copy, shared games playable offline).
3. **Browser streaming is the convenience tier.** The DCV web client is TCP-only and
capped at 2 x 1920x1080. The native client gets QUIC over UDP 8443 and up to 4K.
## Layout
| Path | Purpose |
|---|---|
| `cloudformation/steam-gpu-host.yaml` | IAM role, security group, encrypted game volume, instance, Elastic IP, log group, status alarm |
| `scripts/bootstrap.ps1` | Installs the NVIDIA gaming driver, registers the vGaming marketplace key, installs the DCV server and the CloudWatch agent |
| `scripts/diagnose.ps1` | Emits a one-line JSON health verdict (`gpu-missing`, `gpu-unlicensed`, `dcv-port-closed`, ...) |
| `scripts/validate.py` | Static validation, secret scanning, IAM surface inventory. **No AWS credentials required.** |
| `scripts/hf_job.py` | Runs *inside* a Hugging Face Job: fetches this repo, then validates or deploys |
| `ssm/SteamGpu-Diagnose.json` | Systems Manager document wrapping the diagnostic |
| `iam/instance-role-inline-policy.json` | Least-privilege policy for the gaming host |
| `iam/operator-role-policy.json` | Your debugging identity, with tag-scoped mutations |
| `launch.sh` | One-command deploy: validate, deploy the stack, push the bootstrap over SSM |
| `launch.py` | Driver with `validate` / `plan` / `deploy` / `job` modes |
## Validate without touching AWS
```bash
python -m pip install pyyaml
python scripts/validate.py --root .
```
## Deploy from your own machine
```bash
export AWS_PROFILE=my-profile
export AWS_REGION=us-east-1
export KEY_NAME=my-keypair
./launch.sh --instance-type g6.xlarge --volume-gib 600
```
`--admin-cidr` defaults to your current public IP. `--dry-run` validates and prints the
plan without changing anything.
## Deploy from a Hugging Face Job
Credentials arrive as Hub secrets, so no long-lived keys sit in this repo or on disk.
`launch.sh` then runs on ephemeral Hub compute and the runner disappears afterwards.
```bash
hf jobs uv run \
--name steam-gpu-deploy \
--flavor cpu-basic \
--timeout 40m \
--with huggingface_hub --with pyyaml --with awscli --with boto3 \
--secrets AWS_ACCESS_KEY_ID --secrets AWS_SECRET_ACCESS_KEY --secrets AWS_REGION \
--env KEY_NAME=my-keypair \
--env INSTANCE_TYPE=g6.xlarge \
scripts/hf_job.py
```
Set `MODE=validate` to run the credential-free checks on Hub compute first. Confirm the
flag names against `hf jobs run --help` in your CLI version.
## Launch console
A zero-credential parameter console lives at
[Allszn/steam-gpu-launch-console](https://huggingface.co/spaces/Allszn/steam-gpu-launch-console) —
it generates the exact commands above from the options you pick. It stores no credentials
and calls no AWS API.
## Cost
Windows GPU instances land near **~$0.71/hr** (`g4dn.xlarge`) to **~$0.99/hr**
(`g6.xlarge`) in us-east-1, derived from Linux on-demand list rates plus AWS's stated
$0.046-per-vCPU-hour Windows licence component. Verify in the AWS Pricing Calculator.
Stopping the instance between sessions is the single biggest saving.
## Security notes
- No secrets are stored in this repo. `scripts/validate.py` fails the build if an AWS key,
private key block, Steam password or bearer token is ever committed.
- Only TCP/UDP **8443** is opened, and only to the CIDR you supply. **3389 is never
exposed** — reach RDP through `AWS-StartPortForwardingSession`.
- The instance role cannot widen its own access; mutations in the operator role are
conditioned on the `Project=steam-gpu` tag.
|