Alan Edwardes

Cloud Software & Game Development
  • About
  • Projects
  • Blog

About the Author

Alan is a hobbyist Game Developer and a Software Engineer with 7 years of industry experience.

LinkedIn Icon Twitter Icon Steam Icon GitHub Icon YouTube Icon

Posts in 2021

  • Jenkins Library for Unreal Engine 4 on 13th of Feb
  • Three Approaches to Readable Materials in First Person Games on 7th of Feb
  • Cheap Synthetic Monitoring with AWS Lambda on 24th of Jan

Posts in 2020

  • Generating Mipmaps for Render Targets in UE4 on 24th of Dec
  • Routing DNS over HTTPS Using Raspberry Pi on 6th of Oct
  • Tips for Building Games with Unreal Engine 4 on 3rd of Oct
  • Serving Localised Assets from S3 Using Lambda@Edge on 17th of May

Posts in 2019

  • Automating macOS Notarization for UE4 on 23rd of Nov

Posts in 2018

  • ISO Country Code to Unicode Flag in C# and JavaScript on 22nd of Jul
  • Serverless Git LFS for Game Development on 6th of Jan
  • Adding Custom Map Checks in UE4 on 3rd of Jan

Posts in 2017

  • Building and Deploying a React App Using AWS Lambda on 24th of Dec
  • Git HTTP Username and Password in Environment Variables on 22nd of Dec
  • Capturing and Uploading Screenshots in UE4 on 20th of Dec
  • Using Capsule Shadows on Large Objects in UE4 on 8th of Dec

Category "cloud-software"

Viewing subset of posts filtered by category.

Cheap Synthetic Monitoring with AWS Lambda

Posted January 24th, 2021 in cloud-software

I have a few miscellaneous services which I host for various personal things; MediaWiki, Jenkins, Grafana, Rocket Chat, etc. These are usually hosted on VPS machines with Docker, which means a "one size fits all" monitoring solution is hard.

If I were operating as a business, I would just opt for an off-the-shelf synthetic monitoring solution with a support contract and call it done, but in a personal capacity I don't particularly want to pay.

I had a few criteria:

  • Cheap/free
  • Ability to write synthetic checks using HTTP requests (not a headless browser, that is a bit OTT)
  • Synthetic checks preferably in C#
  • Alerting via email for when the checks fail
  • Hosted redundantly & managed (e.g. AWS, not on a VPS)
  • Low/zero maintenance

Continue Reading »

Routing DNS over HTTPS Using Raspberry Pi

Posted October 6th, 2020 in cloud-software

DNS is a protocol from the late 1980s, and today at its core DNS is still exactly the same. When it was conceived, there wasn't the same privacy focus as there is today, and one of the main drawbacks with the protocol is that queries and responses are not encrypted nor tamper proof when sent over the internet.

DNS over HTTPS is a newer take on the original DNS protocol, which routes queries over secure HTTP connections. While this is seeing some support (namely in Firefox and Windows 10), many devices on your network will continue to send DNS queries over UDP for years to come.

Continue Reading »

Serving Localised Assets from S3 Using Lambda@Edge

Posted May 17th, 2020 in cloud-software

Using Lambda@Edge, you can route users to different assets depending on their browser language, country or device (to name a few). In this post I am going to focus on the Accept-Language header, to detect the user's locale.

Demo

Example image served using this technique:

The text 'GB' for users visiting from the UK, 'US' from the US, 'CA' from Canada, 'EN' for other English speakers and 'GLOBAL' for anyone else.

Depending on your browser language, you will see:

  • "GB" for "English (United Kingdom)" (region-test.png.en-GB)
  • "US" for "English (United States)" (region-test.png.en-US)
  • "CA" for "English (Canada)" (region-test.png.en-CA)
  • "EN" for "English" (region-test.png.en)
  • "GLOBAL" if set to anything else (region-test.png)

Continue Reading »

Serverless Git LFS for Game Development

Posted January 6th, 2018, last updated July 18th, 2020 in cloud-software

For Estranged, I needed a simple, cheap way of storing binary files. All solutions I tested required me to host a server, or me to pay someone to host a server. I wanted to avoid the flat fee for a constantly running server, and use something completely serverless with a pay-for-what-you-use model.

I settled on using a GitHub private git repository (free) and an LFS (large file storage) backend using Amazon Lambda, Amazon S3 and Amazon API Gateway.

This write-up is a follow up to my older YouTube video covering the manual setup. This guide uses a template for a 1-click deployment of all resources mentioned in the video.

Continue Reading »

Building and Deploying a React App Using AWS Lambda

Posted December 24th, 2017 in cloud-software

If you use React with a static frontend web app, the deployment steps may comprise of the following:

  • Run npm install
  • Run npm test
  • Run npm build
  • Deploy build folder to Amazon S3 & invalidate CDN cache

The first part of the build only requires node.js & npm, and the second part can be written in JavaScript too as a package.json script (I'll go into that more below).

Since node and npm are both available on Lambda, we can write a Lambda function invoked using a post-commit webhook (from GitHub or BitBucket), which builds and deploys the React application.

A few advantages to doing this:

  • You don't need any orchestration infrastructure (Jenkins) or cost overhead of BitBucket pipelines and similar solutions
  • Since the environment is completely managed, the only changes you may need to make are updating the Node.js runtime version as Amazon release newer versions
  • Access to the S3 bucket is controlled using IAM roles, no access key/secret

Continue Reading »

Git HTTP Username and Password in Environment Variables

Posted December 22nd, 2017 in cloud-software

Sometimes when automating the use of the git command in scripts against GitHub or BitBucket, you may need to supply a username and password using environment variables.

One example is when using a Jenkinsfile groovy script in a Jenkins pipeline build, where you'd like to use credentials from the Jenkins credentials store.

Fortunately this is possible using a custom git credential helper, in this case a simple bash script (however you can use whatever language you like).

Credential Helper Shell Script

The shell script simply needs to echo a username and password back to git. The below script takes the $GIT_USERNAME and $GIT_PASSWORD environment variables, and prints them in a format git understands.

#!/bin/bash
echo username=$GIT_USERNAME
echo password=$GIT_PASSWORD

Save this as credential-helper.sh

Continue Reading »

Æ

© 2021 Alan Edwardes