Skip to main content
Version: v4 (current)

AWS

Requirements

  • You must have an AWS account setup and ready to create resources.
  • Create a service account and generate an AWS access key and key id.

AWS Credentials

Setup the following as env variables for cloud runner to use:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION (should be the same AWS region as the base stack e.g eu-west-2)

If you're using GitHub you can use a GitHub Action:

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2

Note: This enables Cloud Runner access AWS.

Configuration For AWS Cloud Runner Jobs

Refer to Configuration page or the example below.

Allowed CPU/Memory Combinations

There are some limitations to the CPU and Memory parameters. AWS will only accept the following combinations: AWS Fargate Documentation, Allowed CPU and memory values (Task Definitions)

Summary Of Format

  • Values are represented as 1024:1 GB or CPU.
  • Do not include the vCPU or GB suffix.
  • 1 CPU can go to a max of 6 GB of memory. 2 CPU's are required to go higher.

Valid CPU and Memory Values

- cloudRunnerMemory: 4096
- cloudRunnerCpu: 1024

Example

- uses: game-ci/unity-builder@cloud-runner-develop
id: aws-fargate-unity-build
with:
providerStrategy: aws
versioning: None
projectPath: `your path here`
unityVersion: `unity version here`
targetPlatform: ${{ matrix.targetPlatform }}
gitPrivateToken: ${{ secrets.GITHUB_TOKEN }}
# You may want to export your builds somewhere external so you can access it:
containerHookFiles: aws-s3-upload-build

Custom Steps

A full workflow example can be seen in builder's Cloud Runner GitHub sourcecode for GitHub Pipeline.