Giter VIP home page Giter VIP logo

deploying-unreal-engine-pixel-streaming-server-on-ec2's Introduction

Deploying Unreal Engine Pixel Streaming Server on EC2

This sample is for those who use Unreal Engine 4 to build content and wish to deploy this content to an audience via UE4 pixel streams. Content examples include but are not limited to: interactive entertainment, architectural visualization, high fidelity car configurators, or anyone who needs to let users access high quality interactive content via thin clients such as web browsers.

This sample deployment should take about 1 hour to complete, assuming you have an application with Pixel Streaming enabled. The 1-hour deployment includes:

  1. Creating an AWS account with proper permissions
  2. Creating the S3 bucket and uploading required files to S3
  3. Configuring CloudFormation template to be launched

If you do not have an application with Pixel Streaming, please go to the getting started with Pixel Streaming guide.

Working with UE4 Pixel Streaming on AWS

Using AWS and Unreal Engine 4’s Pixel Streaming solution, developers can create content with Unreal Engine and deploy on AWS so users can engage with the content from any modern Web browser. A build of the UE4 content is run on an Amazon Elastic Compute Cloud (Amazon EC2) G4 instance. G4 instances are GPU instances that are designed for graphics-intensive workloads and offer a powerful, low-cost, pay-as-you-go model which is ideal for on-demand interactive content.

This Quick Start deployment sets up an EC2 environment on AWS that includes the following:

  • Unreal Engine 4 Pixel Streaming components from your pixel streaming build are installed and run on startup. Components include UE4 Windows build with pixel streaming plug-in executable, Stun Server, Turn Server, and Signaling Web Server.
  • Nice DCV is installed allowing developers to connect to the G4 instance, for a low latency remote desktop experience that supports resolutions up to 4k. This allows a developer to remote in to test the build and optionally installUnreal Engine 4 directly on the machine.

Deployment Guide

Follow the steps outlined in the Unreal Engine Pixel Streaming Deployment Guide. Once deployed the CloudFormation stack will deploy the below architecture:

Architecture Diagram

CloudFormation Template Parameters

Parameters Details Default Value
InstanceType Amazon EC2 instance type for the pixel streaming server. Size should be smallest instance size that achieves required performance. g4dn.xlarge
OsVersion Specify the version of Windows(Windows Server 2019) OS to use. Valid values are “WindowsServer2019”, “WindowsServer2016”, or “WindowsServer2012R2”. Windows Server 2019
DiskSize Volume size for the host, in GB. 50
KeyPairName Name of AWS EC2 Key Pair. This is not used when logging into machine, but needed to secure instance on VPC. Requires input
UserPasswd Windows Administrator password used for logging into EC2 via NICE DCV or other administration. It is recommended that you change this default password. Ch4ng3M3!
PixelStreamerBootstrapLocation Specify the location of bootstrap file in S3 which is executed upon initial launch of EC2 instance. Requires input
PixelStreamerBuildLocation Specify the location of UE4 Pixel Streamer build zip file in S3. Requires input
PixelStreamingAccessCIDR IP address range, as an access CIDR, of pixel stream viewers. If your viewers are coming from a specific range, limit the access. 0.0.0.0/0
NiceDCVAccessCIDR IP address range, as an access CIDR, of admins and developers to access server via NICE DCV. It is recommended that you limit this to only trusted IPs, such as specifying your own IP. 0.0.0.0/0
Windows AMIs Default values ensure that the latest Windows AMI published by AWS is used. You can also define a different AMI to use with a different path. AWS Defined AMI Paths

Additional Resources

Solution Notes

Security

There are several security-related aspects of the architecture in this sample. The solution is deployed into the default VPC. It creates a security group that allows fine-grained control of traffic in and out of the EC2 hosting the Pixel Streaming server. You can limit access to IP addresses that need to access the host (see the HostAccessCIDR parameter earlier in this guide). This helps keep the host protected from malicious attacks and helps protect the data (UE4 Pixel Streaming build, in this case).

License

This library is licensed under the MIT-0 License. See the LICENSE file.

deploying-unreal-engine-pixel-streaming-server-on-ec2's People

Contributors

amazon-auto avatar eugenemu avatar kashman-amzn avatar rayjanwilson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deploying-unreal-engine-pixel-streaming-server-on-ec2's Issues

Clients fail to connect to streaming server

This issue seems to be all over the internet in regards to Unreal Pixel Streaming. It might not be associated with AWS per se but it is still an issue that is affecting the end result that this repo is trying to do.

The issue is that clients are not able to connect properly. Users are greeted with the "Click to start" page. Clicking this updates the page with a few controls and the text "Starting connection to server, please wait...". From this point on nothing more will happen.

I believe this to be a networking issue with the TURN server but still have to dig for more information.

Also note that I have tried to connect from multiple machines directly connected to the internet. Any ideas would be great.

Error: Failed to choose a D3D11 Adapter.

I looked at the logs, I saw this:
A D3D11-compatible GPU (Feature Level 11.0, Shader Model 5.0) is required to run the engine.

I think the default instance doesn't have a compatible GPU. I don't know how to proceed.
image

Thus, the build is not running. Please note the webserver does start:
image
image

default password can be exploited if not changed

with the current implementation, if a user doesn't change the default password, then it can be exploited. turns out the default password isn't needed because if removed it will force the end user to create the password, which is the behavior desired.

Documentation update

I followed the documentation, and it turns out I need to add specific roles which took me hours to searched for it. maybe the documentation needs to be updated?

GUIDE: How to use this with 4.27

Here is an update that is required to make this work with 4.27
I tried setting it up and I had issues for first because of changes Unreal did to the Pixelstreaming in 4.27.
In order to make it run for 4.27, this change has to be made on the bootstrap.ps1:

Change the Folder path of runAWS_WithTURN.bat from

'C:\PixelStreamer\WindowsNoEditor\Engine\Source\Programs\PixelStreaming\WebServers\SignallingWebServer\runAWS_WithTURN.bat'

to

'C:\PixelStreamer\WindowsNoEditor\Samples\PixelStreaming\WebServers\SignallingWebServer\platform_scripts\cmd\runAWS_WithTURN.bat'

UseBasicParsing is missing from Turn server ps1

In the ps1 script that starts the turn server, the flag -UseBasicParsing is missing. This means it fails to run the turn server when run as a scheduled task under SYSTEM. Tested on AWS.

UE5 update

Is there an updated version for UE5?

UE5 is a total game changer... Lumen, Nanite..... !

Errors raised while trying to set up auto-scalable pixel streaming

What I'm expecting:
I wanted to set up a pixel streaming application in an auto scalable group, with an internet facing load balancer. With that, I hoped users would have personal access to the engine such that they can run their own 3D experience without seeing what happens to the others.

What I've done:
I built a Cloud Formation stack as I followed the instructions given in the guide. The stack worked well. With the EC2 instances allocated, I took a snapshot and initiated a custom AMI. Then, I launched EC2 g4dn.xlarge instances with this AMI. At that point, I created an auto-scalable group and I attached a load balancer to the group.

The issues:
Several issues occurred when I tested the built application :

  • This error raised on console : WebRTC: ICE failed, your TURN server appears to be broken, see about:webrtc for more details

    and the page is stuck on “Starting connection to server, please wait”

  • I tested with two instances, and if one works, the other one does not. The other one is stuck on “Starting connection to server, please wait” or “Streamer disconnected”

  • If a new user try to connect to the load balancer, for all the other users who are running the application, the page is reloaded.

I would be thankful for any help.

Question: Change Screen Resolution to 1920x1080

Hi, I'm using your solution to deploy pixelstreaming client. Everything works fine. But when I change the resolution of the Unreal Project on launch in the ps1 script the Unreal client doesnt connect to the Signaling Server and it crashes. I assume it's because the default screen resolution without monitor is 1024x768.

Here is the command I use: $action = New-ScheduledTaskAction -Execute "C:\PixelStreamer\WindowsNoEditor$buildExecutable" -Argument "-AudioMixer -PixelStreamingIP=localhost -PixelStreamingPort=8888 -ContentIDs=1,2,3,4,5,6,7,8,9 -WinX=0 -WinY=0 -ResX=1920 -ResY=1080 -Windowed -RenderOffScreen -ForceRes"

Note: When I connect with dice viewer screen resolution of the windows instances is changed to 1920x1080 and I can also launch Unreal client now with this resolution. So I assume I need to install a display adapter or similar. But was wondering if there is a simple solution. Not much to find at google about this.

Thanks in advance for help.

Best,
Dom

How to use AWS certificates to serve Pixel Streaming in https?

We need to serve the Pixel Streaming in an iframe inside our page served via HTTPS. But due to the browser's security policy, we need to load the Pixel Streaming page as HTTPS as well.

How can we get the key.pem and cert.pem files from AWS certificates?

Elastic Load Balancer or Matchmaker Server?

To point new connection/players directly to new/available instances and sessions, which is the preferred method, creating an Elastic Load Balancer or somehow setting up a Pixel Streaming Matchmaker server?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.