Richard Howard

Kongregate’s infrastructure is represented entirely in code via AWS CloudFormation. CloudFormation is a templating system built by AWS for managing their infrastructure as code; you can read more about CloudFormation here. Since Kongregate’s infrastructure is entirely in code, it has been necessary to solve a number of limitations in the CloudFormation structure. One such limitation in CloudFormation is cross stack dependencies. When defining entire infrastructure as code, it becomes a requirement to break down the architecture into logical components (e.g. DNS, web nodes, security groups, etc.). CloudFormation can handle this by nesting a stack within another stack, aptly named "nested stacks" (you can read more here about nested stacks). The major downside to CloudFormation’s nested stacks is its limited flexibility. The Sony Xperia team came up with a great workaround. Using AWS Lambda as an intermediary layer, CloudFormation can reference another stack’s output as an input without a rigid code structure to maintain. Check out their repo here. This tool allows for simpler CloudFormation templates, better code maintainability, and improved overall readability. To