Game On-Demand: Unlocking Cost-Efficient Cloud Gaming with Amazon EC2’s Pay-as-You-Go Model using Steam
Our AWS CloudFormation template automates the installation and configuration of Steam, providing a seamless gaming experience accessible from any device… Diagram describes ways to connect, configure and use AWS resources to play games with Steam… Once logged in, proceed to sign in to your Stea…
Introduction
In today’s gaming landscape, the concept of cloud gaming is gaining momentum, offering a compelling alternative to traditional gaming setups. With the rise of cloud computing, cloud services providers like Amazon Web Services present an opportunity to explore cost-efficient gaming solutions with pay-as-you-go pricing. In this blog post, we’ll demonstrate how Amazon Elastic Compute Cloud (Amazon EC2) instances can transform your gaming experience without the need for substantial investments in personal gaming hardware.
Our AWS CloudFormation template automates the installation and configuration of Steam, providing a seamless gaming experience accessible from any device. Whether you’re a seasoned gamer or new to cloud gaming, our user-friendly guide simplifies the deployment of your own cloud gaming setup and allows you to start playing your favorite games in no time.
Overview of the solution
The main services in this solution are Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Elastic Block Store (Amazon EBS). The architecture is as follows:
The key components of this solution are described in the following list.
- An Amazon EC2 instance of the G5 instance family. Amazon EC2 G5 instances are the latest generation of NVIDIA GPU-based instances that can be used for a wide range of graphics-intensive and machine learning use cases. They deliver up to 3x better performance for graphics-intensive applications and machine learning inference and up to 3.3x higher performance for machine learning training compared to Amazon EC2 G4dn instances.
- An Amazon Elastic Block Store (EBS) volume, providing scalable and high-performance block storage for your EC2 instance. Your operating system, applications, and games are stored in this volume.
- An Amazon EC2 security group that controls the traffic to your instance. This configuration allows seamless connectivity to your EC2 instance via Remote Desktop Protocol (RDP) on port 3389.
Deploying the solution
Note: You are responsible for the cost of the AWS services used while running this solution. For full details, refer to the pricing webpage for each AWS service you will use in this solution. You are responsible for ensuring necessary backups are taken of your server in case of data loss. Be prepared to start additional servers in another Availability Zone to handle traffic if one zone goes down. Make sure to regularly apply Windows updates and other security measures to protect your server. |
Deploy the AWS CloudFormation template
- Save the following CloudFormation template to your local machine.
- Sign in to the AWS Management Console and navigate to CloudFormation
- Select Create Stack.
- Select Choose an existing template and Upload a template file. Select the CloudFormation template that you downloaded from GitHub. Select Next to continue.
- On the Create stack page, verify that the correct template URL shows (the one selected in the previous step) in the Amazon S3 URL text box and choose Next.
- On the Specify stack details page, assign a name to your solution stack.
- Under Parameters, review the parameters for the template and modify them as necessary. This solution uses the following default values.
- Choose Next.
- On the Configure stack options page, choose Next.
- On the Review page, review and confirm the settings. Check the boxes acknowledging that the template will create AWS Identity and Access Management (IAM) resources and that it might require the capability AWS::IAM::Role.
- Choose Submit to deploy the stack.
- You can view the status of the stack in the AWS CloudFormation console in the Status You should receive a CREATE_COMPLETE status in approximately 10 minutes. If the status doesn’t change, review the “Events” tab for troubleshooting information.
- Click on the Outputs column once stack has been deployed
Login to the Server and complete the setup
- Navigate to the SSMsessionManager link found in the Outputs section of your deployed CloudFormation stack, and click on it.
- In the terminal, update the administrator password by entering the following command (ensure to replace <MyStr@ngAdminPassw0rd> with your chosen password): net user administrator <MyStr@ngAdminPassw0rd>
- Navigate to the RDPconnect link found in the Outputs section of your deployed CloudFormation stack, and click on it.
- Enter administrator as the username, and input the password you selected in step 3. Afterward, click the Connect button to proceed.
- Allow some time for the computer to complete its initial login process. Once logged in, proceed to sign in to your Steam account. If you don’t have a Steam account yet, simply click on the Don’t have a Steam account? Create A Free Account link to begin the registration process.
- Browse through your game library to install a favorite title or explore the Steam Store for new gaming adventures. Once you’ve made your selection, allow the download and installation process to finish before proceeding.
- Install the Steam Link app on your preferred device for seamless gaming. Learn more about the app’s features and compatibility by selecting Steam remote play.
- Launch the Steam Link app and seamlessly pair any gaming controller of your choice for an enhanced gaming experience. This step is optional, especially if you’re playing on your Smart TV or prefer using a different input method.
- Now it’s time to pair Steam Link with Steam installed on your Amazon EC2 instance. Click on the cogwheel, then navigate to Computer > Other Computer. Take note of the PIN displayed on the screen and ensure you stay on this pairing screen.
- Return to your deployed Amazon EC2 instance and launch the Steam application. From there, go to Steam > Settings > Remote Play, and choose Pair Steam Link to continue the setup. Enter the PIN you noted down in the previous step, then click the Confirm to proceed with the pairing process.
- Verify that the pairing process has been successfully completed on the Steam Link app installed on your Remote Play device.
- Additionally, you have the option to adjust settings to enhance game streaming performance, though this step is optional. Below, we’ve outlined the settings that typically yield the best framerate with our configuration. Feel free to experiment and customize them to suit your preferences.
- On the Amazon EC2 instance:
- go to Steam > Settings > Remote Play > Enable Advanced Host Options
- [√] Change desktop resolution to match streaming client.
- [ ] Dynamically adjust capture resolution to improve client
- [ ] Use NVFBC capture on NVIDIA GPU
- [√] Enable hardware encoding
- [√] Enable hardware encoding on NVIDIA GPU
- [ ] Enable hardware encoding on AMD GPU
- [ ] Enable hardware encoding on Intel GPU
- Number of software encoding threads (Automatic)
- [√] Prioritize network traffic
- go to Steam > Settings > Remote Play > Enable Advanced Host Options
- On the Remote Play device:
- Cogwheel Icon > Streaming > Customize > Enable Advanced Client Options
- [√] Bandwidth limit = 40 MB/s
- [√] Framerate limit = 60 FPS
- [ ] Hardware Decoding
- [√] HEVC Video
- [√] Low Latency Networking
- Cogwheel Icon > Streaming > Customize > Enable Advanced Client Options
- On the Amazon EC2 instance:
- It’s time to initiate your first connection to your Amazon EC2 instance from your Remote Play device using the Steam Link app.
IMPORTANT: Before beginning gameplay, ensure you disconnect your Remote Desktop Protocol (RDP) session. If you’re using AWS Systems Manager Fleet Manager, simply navigate to Actions > End session. Alternatively, you can utilize the desktop shortcut on the server: end_rdp_session. Always follow above step when exiting your RDP session to maintain proper functionality.
Next, launch the Steam Link app and click on the Start Playing button to begin your gaming session.
- Adjusting your screen resolution to fit your display may be necessary. Using a mouse can simplify this process. Simply navigate to Steam Menu > Power > Minimize Steam. Then, access the System Tray in the lower-right corner and click on the NVIDIA icon. In the NVIDIA Control Panel, select Display > Change resolution, and choose your desired resolution.
If you’re using an ultra-wide monitor and your desired resolution, like 3440 x 1440, isn’t available, ensure you’re connected via RDP before proceeding. Open the folder on the desktop and run SRE.exe. Add your custom resolution by clicking the + button, then click OK. Finally, run restart64.exe for the custom resolution to become available. Once completed, you can adjust the resolution in the NVIDIA Control Panel when logged in via Steam Link.
- Return to Steam, dive into your favorite game, and enjoy!
Cleaning up
- Sign in to the AWS Management Console and navigate to CloudFormation
- Select the stack created in the “Deploy the AWS CloudFormation template” section.
- Select Delete.
Conclusion
In this blog post, we demonstrated how AWS can be leveraged as a cost-effective gaming solution, transforming your gaming experience without requiring significant investments in personal gaming hardware.
Visit the Amazon EC2 G5 instances service page to learn more about how AWS continues to push the boundaries of cost-effectiveness for graphic-intensive applications.
Author: Asif Mithawala