Hello, i guess this is more of a feature request than a question. In any case, the instance sizes available for Linux (small, medium, large) follow the typical pattern of each being roughly 2x CPU and Mem larger than the prior one. However, there's a huge gap between the large and the only next available size, the 2xlarge. Which is ~10x larger (145 vs 15 Gb RAM, 72 vs 8 cpu), and ~10x more expensive. While almost all of our builds are just fine on the medium or large instances, we run some security scanning tools that for one of our larger projects needs more horsepower, but not 10x more. So we're in a situation where we run builds for dozens of projects, but the single project that has to use the 2xlarge ends up representing something like 90% of our CodeBuild charges.
Having a few more instance sizes between large and 2xlarge (e.g. 32Gb ram/16 CPU, 64Gb Ram/32 Cpu) would make this more manageable for us, and I've seen comments /complaints about this elsewhere from other users. I imagine that just adding these new sizes would be the easiest fix in the short term. However, it might be nice to eventually just allow for execution on arbitrary instance types. With perhaps some setup/prereqs along the lines of what's necessary to create custom build images.
For example, for our one outlier project, there are certain aspects of the security scanning phase that are single threaded, so having the fastest possible CPU speeds things up considerably. We manually tested that build on a z1d class instance and saw much better results.