AWS CodeBuild vs GitHub Actions – Pricing Comparison
Date
June 10, 2024
Time Reading
3 minutes
AWS CodeBuild, being one of the services within the suite of CI solutions by Amazon Web Service (along with CodePipeline, CodeDeploy, and CodeCommit) is a common choice for CI needs among projects that are ultimately deployed to the AWS Cloud.
GitHub Actions started as a Git repository as a service but evolved, and is now offering a CI solution of its own.
Although offered by different companies, they both satisfy the same requirement – to set up a CI/CD pipeline for company projects. They both work on projects that are just getting started or existing ones with thousands of contributors.
In this article, we’ll try to shed some light on how these two services compare in terms of cost when used on a real-life scale.
Free Tier comparison
AWS CodeBuild includes 100 free build minutes per month for a CodeBuild job, based on the “general1.small” type, which includes 2 vCPUs, 3GB of memory, and 64 GB of disk space, as per the documentation.
GitHub Actions includes 2000 build minutes per month, and the hardware of each job is fixed to 2 vCPUs, 7GB of memory, and 14 GB of disk space, as per the documentation.
AWS CodeBuild and GitHub Actions Pricing Based on a Live Project
Assume developers commit to your project’s repository, on average, 20 times per day. This will be triggering a CI run, and each build takes, an average of 15 minutes to complete. This brings us to 9000 build minutes per month (20x15x30).
Comparing the CI costs for running the same CI pipeline on GitHub Actions vs AWS CodeBuild, the difference, from a cost perspective, would be:
AWS CodeBuild:
The pricing of AWS CodeBuild depends on the Region you have chosen. However, in most cases, the “general1.small” compute instance will cost you “$0,005” per minute.
- The first 100 minutes from the CodeBuild Free tier do not affect billing.
- The remaining 8900 minutes are charged at $0.005 per minute.
- Total cost: $44.5 per month
GitHub Actions:
The GitHub Actions Pricing solely relies on the storage and minutes required per month.
- The first 2000 minutes from the GitHub Free do not affect billing.
- The remaining 7000 minutes will cost you $0,008 per minute.
- Total cost: $56 per month
Note that GitHub actions have a minute multiplier, which depends on what OS your jobs run. Minutes multipliers are set at a rate of 2 or 10 times for non-Linux runners.
Jobs run on Windows will consume minutes on a 2x, while macOS consumes minutes at a 10x rate
Conclusion
Deciding whether to use CodeBuild or GitHub Actions is rarely based purely on price. Other factors come into play, including flexibility, integration with your project’s other services (e.g., other AWS services), observability (how easy it is for your developers to inspect build logs), scalability, parallelism, etc.
For this reason, I can not highlight one AWS CodeBuild being superior to GitHub Actions, or vice versa. We, at ScavaSoft, use both CodeBuild and GitHub actions for internal projects. GitHub Actions is mostly used for lining and unit testing operations. For continuous deployment to production environments, we rely on AWS CodeBuild and CodePipeline’s tight integration with other AWS services like CloudFormation.