Thanks Andrew for mentioning aem-orchestrator.
I'm the caretaker of AEM OpenCloud, which aem-orchestrator is part of.
AEM OpenCloud is an open source implementation of AEM infrastructure on AWS.
One of the architectures it provides is based on the whitepaper mentioned in previous comments.
AEM OpenCloud provides open source libraries which cover creating machine images, creating AEM environment with features such as blue-green deployment, auto recovery, auto scaling, package and snapshot backups, deployment descriptor, content health check, various metrics and alarms, and many others that would take a while to describe.
It also provides an alternative and simpler architecture with just a single EC2 instance running AEM author, publish, and dispatcher. This is used for automated code commit / pull request regression testing. i.e. when someone creates a pull request, it will automatically create an environment to run full regression test on, and then that instance will be terminated afterward.
If anyone is interested to learn more, feel free to ask more questions here or email me at cliff.subagio@shinesolutions.com .
There is a slide deck at AEM OpenCloud
All code is available on GitHub Search · topic:aem org:shinesolutions · GitHub
Not only everything is open source, AEM OpenCloud is already used in production by some of Australia's largest enterprises.