Amazon AWS CodeBuild Service.
CodeBuild is an Amazon Web Services tool for automating the construction of software. You can now use it to build macOS and iOS apps.
Amazon Web Services (AWS) is a comprehensive set of cloud computing services that enable you to retire your on-premises hardware. With AWS, you can move much of your IT infrastructure to the cloud and leverage the power of Amazon’s vast resources for your computing workloads.
AWS offers a limited free tier for some cloud services, but most services require monthly or hourly fees. In some cases, you only pay for what you use.
CodeBuild is a web service provided by Amazon that enables developers to automate the building and delivery of software and online services using continuous integration and delivery (CI/CD) pipelines.
CodeBuild allows you to build and deliver most software using Amazon cloud resources. You don’t have to manage the hardware and configuration details of your build server.
Development environment container images also allow you to specify custom build server configurations to build and deploy workloads on AWS. AWS uses Docker container images to deploy environments.
There’s also a Docker desktop app for Mac OS.
The idea of container images is that you can configure your build environment once and save it to the image. You can then deploy the image anywhere without having to configure it every time.
Amazon’s Sebastien Stormacq announced Mac support in CodeBuild in an AWS blog post. Most apps for Apple platforms use Apple’s proprietary Xcode development tools to build, so in most cases you’ll need to run Xcode on your Mac.
You can use AWS CodeBuild in conjunction with source code management (SCM) tools such as git, GitHub, and GitLab to fully automate your build system.
You can also use CodeBuild to create tvOS and watchOS apps.
CodeBuild leverages other Amazon web services, including popular compute, image, and authentication services.
Start
CodeBuild is not one of the AWS services included in Amazon’s free tier, so you have to pay for it.
CodeBuild has two pricing models. One model pays for the entire 24-hour cycle, and the other pays only for the hours actually used in AWS when using CodeBuild.
Oddly enough, one reason for this is that Apple’s macOS licensing agreement requires a minimum 24-hour period for “leased developer services.”
All AWS CodeBuild Mac services run on Mac mini in one of two configurations:
24GB/8 CPU @ $28.80/24 hours 32GB/12 CPU @ $51.84/24 hours
AWS works on the concept of cloud instances using Amazon’s own Elastic Compute Cloud (EC2). Each instance represents a virtual computing resource running in the cloud, effectively becoming a cloud server from a consumer’s perspective.
The AWS Free Tier gives you a whopping 750 hours per month for 12 months, and that doesn’t include the CodeBuild service.
CodeBuild uses two cloud capacity models called on-demand capacity and reserved capacity. Amazon calls these “capacity fleets.”
If you use the on-demand model, you get automatic scaling and only pay for the build time you use. With reserved capacity, you reserve an entire 24-hour period or more for your builds, and those AWS instances cannot be released until 24 hours have passed.
The default macOS CodeBuild image includes all the tools you need, including Xcode, the .NET SDK, Go, Java, Fortran, Kotlin, clang, Swift compilers, and a host of web-based tools. You can also create custom images if needed.
AWS Region
AWS has many regions around the world, with Mac instances in Ohio, Virginia, Oregon, Frankfurt, and Sydney. You can specify a region in your AWS configuration, or you can let the service decide where to run your instance.
Amazon has a complete table of which AWS services are available in which regions.
composition
After you sign up for CodeBuild, you need to go to the Reserved Capacity macOS Fleet page and follow the instructions there to configure your Mac service.
You can also use AWS’s Virtual Private Cloud service. Once your instance is provisioned and set up, it takes approximately 8 to 10 minutes to be online and ready for use.
Obviously, CodeBuild services aren’t cheap, but they can potentially save money for large and medium-sized organizations. Without a cloud build service, you would need build and network infrastructure to run your builds and employees to manage them.
Cloud build services allow you to automate and manage your builds on AWS so you don’t have to.