Skip to content

AWS Credit Specification support

NOTE THAT THIS FORK IS MAINTAINED FOR CRITICAL BUG FIXES AFFECTING RUNNING COSTS ONLY. NO OTHER CONTRIBUTIONS WILL BE ACCEPTED.

What critical bug this MR is fixing?

The Credit Specification setting of AWS isn't supported.

How does this change help reduce cost of usage? What scale of cost reduction is it?

This is in the AWS docs:

T4g, T3a and T3 instances launch as unlimited by default (unless you change the default). If the average CPU usage over a 24-hour period exceeds the baseline, you incur charges for surplus credits.

The pricing of a CPU credit is shown here: https://aws.amazon.com/ec2/pricing/on-demand/#T2.2FT3.2FT4g_Unlimited_Mode_Pricing

Example of a user who only wants to use free resources: AWS provides 750 hours/month of free t4g.small.
The CPU credit price for T4g is $0.04/vCPU/hour, so double that to $0.08/hour for the t4g.small.
Multiply that with 750 hours (as a max), we get $60. That's quite a bit more than the $0 the user expected.

Of course, it can get a lot more expensive for users who use other instance classes. This is just an example.

In what scenarios is this change usable with GitLab Runner's docker+machine executor?

If all of the below match:

  • A machine CPU usage is above the baseline utilization (Which is to be expected of a CI runner).
  • The machine defaults to unlimited (currently T4g, T3a and T3).

Merge request reports