# Is it possible to build Lightmass on a headless AWS EC2 instance?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-build-lightmass-on-a-headless-aws-ec2-instance/819960>\
**Category:** Platform & Builds\
**Tags:** Lightmass, Server, build, unreal-engine, Lighting, question\
**Created:** [March 25, 2023, 5:45am UTC](https://forums.unrealengine.com/t/is-it-possible-to-build-lightmass-on-a-headless-aws-ec2-instance/819960 "2023-03-25T05:45:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![samuel\_sn](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samuel\_sn](https://forums.unrealengine.com/u/samuel_sn)\
**Post date:** [March 25, 2023, 5:45am UTC](https://forums.unrealengine.com/t/is-it-possible-to-build-lightmass-on-a-headless-aws-ec2-instance/819960/1 "2023-03-25T05:45:47Z")

</div>

I am trying to set up a CI/CD pipeline which hopefully builds the games lighting as a pipeline step. The build should take place on an EC2 instance on AWS through the command line.  
The instance runs Windows Server 2022 with UE4 2.27.2 installed.

I haven’t been able to build the lighting on the remote instance yet.

the command I am using:

```auto
UE4Editor-Cmd.exe <uproject path> -run=resavepackages -buildlighting -quality=Preview -allowcommandletrendering -map=<map>

```

The initial problem was an error that popped up when building the lighting:

“a d3d11 compatible gpu is required to run the engine”

This error led me to finding the flag: -nullrhi

Adding this flag however, throws a new error:

```sh
LogWindows: Error: === Critical error: ===
LogWindows: Error:
LogWindows: Error: Assertion failed: RenderTarget [File:F:/UnrealEngine/UE_4.27.2_oc/Engine/Source/Runtime/Engine/Private/UserInterface/Canvas.cpp] [Line: 758]
LogWindows: Error:
LogWindows: Error:

```

I also get this error on my local PC, not just the remote instance. It seems that the -nullrhi flag doesn’t play well with the

I’m relatively new to UE4 so I’m unsure if what I am trying to do is even possible.  
Is it possible to build Lightmass on a headless instance?  
If so what flag or settings am I missing to enable this?

Some previous posts I found related to this that have been useful but haven’t solved my issues:

- [Can't run ue 4.19 on a headless ubuntu 16.04](https://forums.unrealengine.com/t/cant-run-ue-4-19-on-a-headless-ubuntu-16-04/427609)
- [Building lightmaps on a headless box](https://forums.unrealengine.com/t/building-lightmaps-on-a-headless-box/433035)

I’m happy to provide any additional info that could help! Thank for any help and pointers in advance
