How to use AWS CodeBuild to make macOS apps

Posted:
in macOS

CodeBuild is an Amazon Web Service tool for automating the building of software. Now you can use it to build macOS and iOS apps.

AWS CodeBuild service now includes macOS.
Amazon AWS CodeBuild service.
Amazon Web Services

(AWS) is a comprehensive set of cloud computing services that allow you to ditch your on-premises hardware. With AWS you can shift much of your IT infrastructure to the cloud, leveraging the power of Amazon's vast resources for your compute workloads.

AWS offers a limited free tier for some cloud services, but most services require a monthly or hourly fee. In some cases, you pay only for what you use.

CodeBuild is a web service Amazon provides to allow developers to use Continuous Integration and Continuous Delivery (CI/CD) pipelines to automate building and delivering software and online services.

With CodeBuild, you can use Amazon cloud resources to build most of your software and deliver it. All without having to manage the details of the build server hardware and configuration.

Using development environment container images, you can also specify custom-build server configurations on AWS to build and deploy your workloads. AWS uses Docker container images for environment deployment.

There's also a Docker desktop app for Mac OS.

The idea with container images is so you can configure your build environment once and save it to an image. You can then deploy the image anywhere and avoid having to do the configuration each time.

Doing macOS or iOS builds on CodeBuild was previously unavailable, but that all changed on 19 August.

In an AWS blog post Sebastien Stormacq of Amazon announced Mac support in CodeBuild. Since most apps for Apple platforms use Apple's own Xcode development tools to perform builds, you'll need to run Xcode on a Mac in most cases.

Along with Source Code Management (SCM) tools such as git, GitHub, and GitLab, your build system can be fully automated using AWS CodeBuild.

You can also use CodeBuild to create tvOS and watchOS apps.

CodeBuild leverages Amazon's other web services, which include general compute, images, and authorization services.

Getting started



CodeBuild isn't one of the AWS services included in Amazon's free tier, so you'll need to pay for it.

There are two models of pricing for CodeBuild: one in which you pay for a full 24-hour cycle, and one where you pay only for the actual hours used on AWS when you use CodeBuild.

Oddly, this is in part because Apple's macOS license agreement requires a minimum 24-hour period for any "leased permitted developer services".

All of the AWS CodeBuild Mac services run on Mac minis in one of two configurations:

  1. 24GB/8 CPU @ $28.80/24 hours

  2. 32GB/12 CPU @ $51.84/24 hours



AWS operates on the concept of cloud instances that use Amazon's own Elastic Compute Cloud (EC2). Each instance represents a virtual computing resource that runs in the cloud - effectively a cloud server from the consumer's standpoint.

In the AWS free tier, you can get a whopping 750 hours per month for twelve months, but this doesn't include the CodeBuild service.

CodeBuild uses two cloud capacity models, called on-demand and reserved capacity. Amazon calls them 'capacity fleets.'

If you're using the on-demand model you get automatic scaling, and pay only for build minutes used. With reserved capacity, you reserve an entire 24 hours or more for build and those AWS instances can't be released until the 24 hours have elapsed.

The default macOS CodeBuild image includes all the tools you need, including Xcode, the .NET SDK, Go, Java, Fortran, Kotlin, clang and Swift compilers, and a host of web-based tools. You can also create custom images if you like.

AWS regions



AWS has various regions around the world, with the Mac instances operational in Ohio, Virginia, Oregon, Frankfurt, and Sydney. You can specify regions in your AWS configuration, or let the service decide where to run the instances.

Amazon has a full table of which AWS services are available in which regions.

Configuration



Once you've signed up for CodeBuild, you'll need to configure your Mac services by going to the reserved capacity macOS fleet page and following the instructions there.

Also, check out the Reserved Fleet Properties page.

You can also use AWS's Virtual Private Cloud services. Once instances are provisioned and set up, it takes about eight to ten minutes for them to come online and be ready to use.

It's advisable for you to read the basic AWS CodeBuild docs, and the macOS image runtimes subsection.

There's also an Amazon EC2 Mac Instances section on the AWS News Blog.

Obviously, the CodeBuild service isn't cheap, but for large and mid-sized organizations it could save money. Without a cloud build service, you'll need to have build and network infrastructure to run builds - and employees to manage it.

By using cloud build services, you can let AWS automate and manage your builds so you don't have to.



Read on AppleInsider

ForumPostappleinsideruserraymondai

Comments

  • Reply 1 of 2
    I think the fact that this is dedicated hardware, I can't justify spending $51.84/24 hours for a Mac mini? Rather just buy a Mac mini really. AWS is aimed at huge companies who are happy to waste money and don't care about costs containment? And as Mac Mini's get faster chips, it will make real sense to just buy one if you are a serious developer. 
    ForumPost
  • Reply 2 of 2
    dewmedewme Posts: 5,680member
    I think the fact that this is dedicated hardware, I can't justify spending $51.84/24 hours for a Mac mini? Rather just buy a Mac mini really. AWS is aimed at huge companies who are happy to waste money and don't care about costs containment? And as Mac Mini's get faster chips, it will make real sense to just buy one if you are a serious developer. 
    Not necessarily. Many companies have an elastic demand for computing resources and find it more cost effective to ramp up, or down, computing capacity only as needed instead of taking on more capital expenses or have to deal with excess capital including internal IT costs. I don't know of any "huge companies" off the top of my head that stay huge for very long while wasting money and not managing costs. Governments may be a different story.

    Being able to rent additional capacity when needed can also be cost effective for startups seeking investors and funding. Cloud services can also be blended with on-premise services, e.g., hybrid cloud, to gain more flexibility, agility, and improve time to market. Smart companies and serious developers will use whatever tools and services that are available to them to improve their productivity and profitability. Having more options is always a good thing. There are no one-size-fits-all solutions.
    ForumPostneoncat
Sign In or Register to comment.