Autoscale with AWS
Description
Runners in AWS is important for IAM AWS has huge market share and many organizations are quite AWS centric with AWS IAM everywhere. Runners in AWS can gain access to AWS APIs via Service Roles - a familiar and desired pattern.
Current option is slow. We have one option for installing multi-runner with auto scale in AWS - Docker Machine. BUT this subjects us slow start times of EC2 (better on DO). Current documentation describes a custom crafted process of setting up and configuring rather than IaC or cattle approach. K8S is great, but not every org is willing to do K8S until there is an AWS branded version with seamless IAM.
AWS CodeBuild. Fully managed, docker builds on demand. Custom images can be used, stock images allow DinD. Jenkins can use (via plugin of course ).
Proposal
Build in native support for AWS CodeBuild just as with docker-machine and k8s. The Jenkins plugin uses S3 but the buildspec and env vars can be set via API and start with fetching from GitLab.
A CodeBuild job runs in a project. The integration will need to create the CodeBuild Project - akin to registering a runner with a project? so we would want to parallel it and be ale to create multiple CodeBuld Projects (maybe in different AWS accounts). We can let users do this on their own or provide a Terraform plan / docker image that could be run early in the pipeline or a button that does it all magically.
The GitLab Project would be configured with the CodeBuild Project ARN?
The GitLab-CI job that has the tag (the arn?) would transform the job's definition to a buildspec format and start a build with the pipeline's env vars and the generated buildspec string. There would be the handling of artifacts added to the buildspec and maybe we just support DinD so the buildspec can get the creds to pull the job's image.