SuperNimbusKnowledge Base

UE5 Engine AMI

Introduction

In this section of the tutorial series we will be setting up the Unreal Engine on the base-Windows image we created in the previous tutorial.

Note
This tutorial is part of a series of tutorials on building UE5 projects using Jenkins and AWS CodePipline.
You can see Part 3 of this tutorial below.

Launching From The Base AMI

To make it easier to configure future AMIs based on the windows-base-AMI, we can launch instances using our custom AMI in the EC2 dashboard.

When launching an instance, you can select “My AMIs” in the “Application and OS Images (Amazon Machine Image)“ section.

Then select “Owned by me“ and choose the base image.

Configuring the UE5 AMI

We will now configure a new AMI that is capable of building UE5 projects. To do so we will need some specific software pre-installed on the instance before creating our new image.

Launch a new EC2 instance from our custom jenkins-agent-windows-base image and install the following software.

After the installation, make sure to shut down the instance with SysPrep and create a new image.

Note
We went through the SysPrep flow in the previous tutorial here.

Required Software

Visual Studio 2019 Community

Download and install Visual Studio 2019 Community and the required add-ons. You can find the download here.

We have found some useful resources for the installation.
I recommend following the second article, which covers everything needed to install UE5 from source, including the C++ redistributables and the Window SDK Debugging tools:

7zip

7-Zip is a free and open-source file archiver. It will make it easier for us to compress our final packaged builds.

You can download and install 7zip from here.

You will need to add the path “C:\Program Files\7-Zip” to the system path variable .

Test that 7zip is available by typing the following command in Powershell:

7z version

Unreal Engine

You will need to download and install Unreal Engine from source. You can find some additional resources describing the process here.

In this example we need to install Unreal Engine 5.2.

The process will be largely the same regardless of the version of the engine. Make sure you do this on the “D:” drive which has enough space for the full engine as well as your project.

You can always increase the Volume size according to demand. Extending the volume is quite straightforward, but if you run into any issues, you can read up on the process here.

Python

We use Python to write all of our build scripts. We therefore need to have it installed on the agent machine to run the build scripts.

Download and install Python from here.

UE4 CLI

We also use the UE4 CLI for our builds. This tool tremendously simplifies the process of calling the UnrealEngine build system. It also works with Unreal Engine 5 and up.

You can download and install the ue4-cli using the Powershell command:

pip3 install ue4cli
ue4 setroot <engine dir> 

Our engine directory is “D:\UE_5.2”

And then this command…

ue4 build-target UnrealEditor

This command builds the UE5 development editor.

We can use this to check that everything is working as intended.

AWS CLI

We make use of the AWS CLI in our build scripts to upload our final packaged builds to an S3 bucket.

We also use the GameLift service to upload new builds, launch fleets and configure aliases.

Lastly, we can also use the CLI to send emails using SES.

You can download and install the AWS CLI from here.

You can test it by running the following command in Powershell:

aws --version

Adding The AMI To The Controller EC2 Cloud

We can add our new AMI to the Jenkins cloud the same way as we did for our windows-base AMI. However, depending on your needs, you can tweak the instance size to speed up the build process.

Using a C5.9xlarge instance will keep build times short but will cost more money to keep running.

Summary

In this section we prepared our Jenkins server to be able to handle Unreal Engine builds.

In the next section we are going to work with the Unreal Engine build command, as well as configuring destinations for our build outputs.

Jump to section